abottarini / laravel-nova-traits
A set of useful Laravel Nova Traits for your Resources
Installs: 5 866
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.1.0
- laravel/nova: *
README
This package contains a set of useful Laravel Nova Traits for your Resources.
Installation
composer require abottarini/laravel-nova-traits
Usage
Usage is super simple, just import traits in your Resource and use them.
use AlbertoBottarini\LaravelNovaTraits\HiddenFromNavigation; class MyResource extends Resource { use HiddenFromNavigation; }
Available Traits
- HiddenFromNavigation: Removes resource from navigation bar
- Uncreatable: Disables create action for all users
- Unupdatable: Disables update action for all users
- Undeletable: Disables delete action for all users
- Unviewable: Disables view action for all users
- Unreplicable: Disables replicate action for all users (Nova 4)
- ReadOnlyResource: Makes resource read-only (is an alias of Uncreatable + Unupdatable + Undeletable)
- RedirectToViaResource: Redirects user to "via" Resource after creating or updating a child Resource