# How to install
Follow the steps below to install the package
# Prerequisites
Before installing Nova ACL you need to install Spatie Permission (opens new window) package.
You also need to add the HasPermissions
trait to the user model:
use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasPermissions;
class User extends Authenticatable
{
use HasPermissions;
}
# Install via composer
Install package via composer (opens new window)
composer require masoudi/nova-acl
# Post Installation
You should publish the package files with the following command
php artisan vendor:publish --tag=nova-acl
Run artisan migrate
command
php artisan migrate
Add ForgetCachedPermissions
middleware in config/nova.php
for clear cache when permissions changed
...
'middleware' => [
'web',
HandleInertiaRequests::class,
DispatchServingNovaEvent::class,
BootTools::class,
\Masoudi\NovaAcl\Middlewares\ForgetCachedPermissions::class
],
...