arsenaltech / nova-tab by shabbirbharmal

A Laravel Nova field.
127,097
74
4
Package Data
Maintainer Username: shabbirbharmal
Package Create Date: 2018-08-29
Package Last Update: 2020-03-02
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-03-28 03:15:26
Package Statistics
Total Downloads: 127,097
Monthly Downloads: 243
Daily Downloads: 11
Total Stars: 74
Total Watchers: 4
Total Forks: 16
Total Open Issues: 10

Laravel Nova Tab Total Downloads

Custom Nova field to render tabs

Installation

Install the package into a Laravel app that uses Nova with Composer:

composer require arsenaltech/nova-tab

Usage

Add the Tabs trait to your App\Nova\Resource class.

use Arsenaltech\NovaTab\Tabs;

abstract class Resource extends NovaResource
{
    use Tabs;

Add the field to your resource in the fields method:

use Arsenaltech\NovaTab\NovaTab;


new NovaTab('User Information', [
            Text::make('Name')
                ->sortable()
                ->rules('required', 'max:255'),
            Text::make('Email')
                ->sortable()
                ->rules('required', 'email', 'max:255')
                ->creationRules('unique:users,email')
                ->updateRules('unique:users,email,{{resourceId}}')]),
new NovaTab('Address Information', $this->addressFields()),
new NovaTab('Other Information', $this->otherFields()),