This package provides an intuitive admin UI for spatie/laravel-permission, the industry-standard package for role and permission management in Laravel. Built with Livewire and designed with modern aesthetics in mind.
Note: This is not a replacement for
spatie/laravel-permission. It's a visual interface that makes it easier to manage the roles and permissions you create with Spatie's excellent package.
�👉 Read the full documentation at beartropy.com/permissions
composer require beartropy/permissions
composer require spatie/laravel-permission
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
php artisan migrate
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable
{
use HasRoles;
}
Navigate to /permissions in your application.
Publish the configuration file:
php artisan vendor:publish --tag=beartropy-permissions-config
// config/beartropy-permissions.php
return [
'prefix' => 'permissions',
'middleware' => ['web', 'auth', 'can:manage-permissions'],
'gate' => 'manage-permissions',
'user_model' => App\Models\User::class,
'guards' => ['web'],
'default_guard' => 'web',
'user_display_field' => 'name',
'user_search_fields' => ['name', 'email'],
'group_permissions' => true,
'permission_group_separator' => '.',
];
php artisan vendor:publish --tag=beartropy-permissions-views
php artisan vendor:publish --tag=beartropy-permissions-lang
Use dot notation for automatic grouping:
| Permission | Group |
|---|---|
users.view |
users |
users.create |
users |
posts.edit |
posts |
settings.view |
settings |
The package includes translations for:
Add more languages by publishing translations and creating new language files.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.
[!NOTE] Disclaimer: This software is provided "as is", without warranty of any kind, express or implied. Use at your own risk.
How can I help you explore Laravel packages today?