Closed beshoo closed 1 year ago
You can customize your resource
https://github.com/serenysoft/nova-permissions#customizations
I don't understand, i will be thankful for you if you could show me an example.
app/Nova/Role.php
<?php
namespace App\Nova;
use Sereny\NovaPermissions\Nova\Role as BaseRole;
class Role extends BaseRole
{
/**
* Indicates whether Nova should check for modifications between viewing and updating a resource.
*
* @var bool
*/
public static $trafficCop = false;
}
app/Providers/NovaServiceProvider.php
<?php
namespace App\Providers;
use Sereny\NovaPermissions\NovaPermissions;
class NovaServiceProvider extends NovaApplicationServiceProvider
{
...
/**
* Get the tools that should be listed in the Nova sidebar.
*
* @return array
*/
public function tools()
{
return [
NovaPermissions::make()
->roleResource(App\Nova\Role::class)
];
}
}
Thank you so much.
Solved
https://github.com/laravel/nova-issues/discussions/5639
Please follow Nova team advice