Download the PHP package shuvroroy/nova-tabs without Composer
On this page you can find all versions of the php package shuvroroy/nova-tabs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nova-tabs
Nova tabs
This package will help you to create tabs in your resource detail & form page.
Support For This Project
Requirements
- PHP (^8.1 or higher)
- Laravel Nova (^4.12 or higher)
Installation
Require the package with composer
Usage
Tabs Panel
You can group fields of a resource into tabs.
The first tab in every Tabs
instance will be auto-selected.
Combine Fields and Relations in Tabs
Tabs on Edit View
Tabs are always shown on edit view as of Nova 4 for now.
Tab object
It's possible to use a Tab
class instead of an array to represent your tabs.
Property | Type | Default | Description |
---|---|---|---|
name | string |
null |
The name of the tab, used for the slug. Defaults to the title if not set |
showIf | bool or Closure |
null |
If the result is truthy the tab will be shown. showIf takes priority over showUnless and if neither are set, true is assumed. |
showUnless | bool or Closure |
null |
If the result is falsy the tab will be shown. showIf takes priority over showUnless and if neither are set, true is assumed. |
showHeadingForRelationships | array |
array |
This is show a headings for individual relationship field based on array attribute value |
Customization
Display more than 5 items
By default, any HasMany
, BelongsToMany
and MorphMany
fields show 5 items in their index. You can use Nova's built-in static property $perPageViaRelationship
on the respective resource to show more (or less).
Tab change Global Event
Nova Tabs emits an event upon tabs loading and the user clicking on a tab, using Nova Event Bus. Developers can listen to the event called nova-tabs-changed
, with 2 parameters as payload: The tab panel name and the tab name itself.
Example of a component that subscribes to this event:
Credits
- Shuvro Roy
- Emini Arts GmbH
- All Contributors
License
The MIT License (MIT). Please see License File for more information.