All Projects → dkulyk → nova-tabs

dkulyk / nova-tabs

Licence: other
Another Laravel Nova Tabs Package

Programming Languages

Vue
7211 projects
PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
SCSS
7915 projects

Projects that are alternatives of or similar to nova-tabs

pre-commit-hooks
git pre-commit hooks
Stars: ✭ 71 (+18.33%)
Mutual labels:  tabs
browser-tabs-lock
Using this package, you can synchronise your code logic across browser tabs.
Stars: ✭ 29 (-51.67%)
Mutual labels:  tabs
nova-links
Add links to your nova sidebar
Stars: ✭ 32 (-46.67%)
Mutual labels:  nova
react-native-viewpager-carousel
a flexible viewpager library with carousel functionality
Stars: ✭ 39 (-35%)
Mutual labels:  tabs
custom-relationship-field
Emulate HasMany relationship without having a real relationship set between resources
Stars: ✭ 18 (-70%)
Mutual labels:  nova
react-native-paper-tabs
Smooth and fast cross platform Material Design Tabs for React Native Paper
Stars: ✭ 112 (+86.67%)
Mutual labels:  tabs
Krypton-Toolkit-Suite-NET-Core
A update to Component factory's krypton toolkit to support .NET Framework 3.5 to .NET Core
Stars: ✭ 27 (-55%)
Mutual labels:  tabs
dockview
Zero dependency layout manager and builder with ReactJS support
Stars: ✭ 45 (-25%)
Mutual labels:  tabs
nova-qrcode-field
A Laravel Nova field to generate QR Code
Stars: ✭ 28 (-53.33%)
Mutual labels:  nova
nova-froala-editor
Froala editor input for laravel nova
Stars: ✭ 18 (-70%)
Mutual labels:  nova
nova-inline-morph-to
A Laravel Nova field for displaying morphTo relationship inline.
Stars: ✭ 32 (-46.67%)
Mutual labels:  nova
nova-unlayer-field
🦜 Drag’n’drop email builder for Laravel Nova that uses Adds a Laravel Nova field for Unlayer service under the hood.
Stars: ✭ 27 (-55%)
Mutual labels:  nova
nova-horizon
Horizon statistics in Nova
Stars: ✭ 70 (+16.67%)
Mutual labels:  nova
nova-json-wrapper
Allows you to group Nova fields and merge their output into a single JSON column
Stars: ✭ 14 (-76.67%)
Mutual labels:  nova
Material-Design-Resume
A simple resume template with a material design touche , testing the Google style CSS ( indigo-green ).
Stars: ✭ 18 (-70%)
Mutual labels:  tabs
power-close
A browser addon for the tab addict that closes tabs based on domain name or keyword
Stars: ✭ 20 (-66.67%)
Mutual labels:  tabs
alfred-tabs
🔍 Find Chrome/Safari tabs you want easily
Stars: ✭ 13 (-78.33%)
Mutual labels:  tabs
nova-sluggable
Slug field for Laravel Nova
Stars: ✭ 40 (-33.33%)
Mutual labels:  nova
nova-system-resources
Display the system usage in Laravel-Nova
Stars: ✭ 30 (-50%)
Mutual labels:  nova
nova-opening-hours-field
Laravel Nova custom field for https://github.com/spatie/opening-hours
Stars: ✭ 33 (-45%)
Mutual labels:  nova

Another Laravel Nova Tabs Package

Latest Version on Github Total Downloads Become a Patron!

  1. Installation
  2. Usage
    1. Tabs Panel
    2. Tabs Panel with Toolbar
    3. Relationship Tabs
    4. Combine Fields and Relations in Tabs
  3. Customization

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require dkulyk/nova-tabs

Usage

Tabs Panel

image

You can group Fields of a Resource into Tabs.

// in app/Nova/Resource.php

use DKulyk\Nova\Tabs;

public function fields()
{
    return [
        
        // ...
        
        new Tabs('Tabs', [
            new Panel('Balance', [
                Number::make('Balance', 'balance')->onlyOnDetail(),
                Number::make('Total', 'total')->onlyOnDetail(),
            ]),
            'Other Info' => [
                Number::make('Paid To Date', 'paid_to_date')->onlyOnDetail(),
            ],
        ]),
        
        // ...
        
    ];
}

Tabs Panel with Toolbar

If you are only using a Tabs without another default Panel, you can call withToolbar method like in Panel.

image

// in app/Nova/Resource.php

use DKulyk\Nova\Tabs;

public function fields(Request $request)
{
    return [
        (new Tabs('Contact Details', [
            'Address' => [
                ID::make('Id', 'id')->rules('required'),
                Text::make('Email', 'email')->sortable(),
                Text::make('Phone', 'phone')->sortable(),
            ],

            'Relations' => [
                BelongsTo::make('User'),
                MorphTo::make('Contactable')->types([
                    Client::class,
                    Invoice::class,
                ]),
            ]
        ]))->withToolbar(),
    ];
}

Relationship Tabs

image

You can also group Relations into Tabs.

// in app/Nova/Resource.php

use DKulyk\Nova\Tabs;

public function fields(Request $request)
{
    return [

        // ...

        new Tabs('Relations', [
            HasMany::make('Invoices'),
            HasMany::make('Notes'),
            HasMany::make('Contacts')
        ]),

        // ...

    ];
}

Combine Fields and Relations in Tabs

image

image

use DKulyk\Nova\Tabs;

public function fields(Request $request)
{
    return [
        (new Tabs(__('Client Custom Details'), [
            new Panel(__('Details'), [
                    ID::make('Id', 'id')->rules('required')->hideFromIndex(),
                    Text::make('Name', 'name'),
            ]),
            HasMany::make('Invoices')
        ])
    ];
}

Customization

By default, the Tabs component moves the search input and the create button to the tabs. If you have a lot of tabs, you can move them back down to its own line:

// in app/Nova/Resource.php

use DKulyk\Nova\Tabs;

public function fields(Request $request)
{
    return [

        // ...

        (new Tabs('Relations', [
            HasMany::make('Invoices')
        ]))->defaultSearch(true),

        // ...

    ];
}

If you want to hide card label you can use ->hideLabel() for Tabs panel.

Set ->defaultSearch(true) to revert it to its default.

image

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].