PHP code example of zohaib482 / laravel-simple-rbac
1. Go to this page and download the library: Download zohaib482/laravel-simple-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/ */
zohaib482 / laravel-simple-rbac example snippets
php artisan db:seed --class=RbacSeeder
public function run(): void
{
$this->call([
RbacSeeder::class,
// Your other seeders...
]);
}
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Zohaib482\SimpleRbac\Traits\HasRoles;
class User extends Authenticatable implements MustVerifyEmail
{
use HasRoles;
// ... other traits and properties
}