This package will create a simple Dashboard for managing roles/permissions based on the spatie/laravel-permission package.
Notice: this is a very early version of the package, may be buggy. Please report issues.
First, before installing this package, you need to have the spatie/laravel-permission
installed and configured.
composer require laraveldaily/laravel-permission-ui
Go to yourdomain.com/permissions
and you should see a simple dashboard with three menu items on top: to manage roles, permissions and assign them to users.
That dashboard is by default protected by the auth
middleware, but you can configure it, by publishing the config:
php artisan vendor:publish --provider="LaravelDaily\PermissionsUI\PermissionsUIServiceProvider"
And then edit the values in config/permission_ui.php
:
return [
'middleware' => ['web', 'auth'],
'url_prefix' => 'permissions',
'route_name_prefix' => 'permission_ui.',
];
The visual design is based on simple Tailwind classes. At the moment, no visual customization options are available, but we may add them in the future, based on your ideas and feedback.
To run the package's unit tests, run the following command:
vendor/bin/phpunit