Looking to hire Laravel developers? Try LaraJobs

laravel-nova-traits maintained by abottarini

Description
A set of useful Laravel Nova Traits for your Resources
Last update
2023/04/13 10:26 (dev-master)
License
Links
Downloads
16 710

Comments
comments powered by Disqus

Laravel Nova Traits

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