This package can be used with admin-lte template
composer require pilabrem/laravel-permission-ui
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="migrations"
php artisan migrate
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider" --tag="config"
php artisan vendor:publish --provider="Pilabrem\LaravelPermissionUI\LaravelPermissionUiServiceProvider"
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles; // New line usage
class User extends Authenticatable
{
use Notifiable;
use HasRoles; // New line
...
}
php artisan db:seed --class=Pilabrem\\LaravelPermissionUI\\database\\seeds\\DatabaseSeeder
- Email: [email protected]
- Password: password
@include('admin.menu')