1. Go to this page and download the library: Download itstructure/laravel-rbac 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/ */
class DatabaseSeeder extends Seeder
{
public function run()
{
$this->call(LaRbacDatabaseSeeder::class);
}
}
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Itstructure\LaRbac\Interfaces\RbacUserInterface;
use Itstructure\LaRbac\Traits\Administrable;
class User extends Authenticatable implements RbacUserInterface
{
use Notifiable, Administrable;
protected $fillable = [
'name', 'email', 'password', 'roles'
];
protected $hidden = [
'password', 'remember_token',
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.