1. Go to this page and download the library: Download vdes/permision_roles library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Models;
// tambah kode
use Vdes\PermisionRoles\Permissions\HasPermissionsTrait;
// end kode
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
....
// tambah ini HasPermissionsTrait pada use
use HasFactory, Notifiable, HasPermissionsTrait ;
....
}