PHP code example of reksmey / filament-spatie-roles-permissions
1. Go to this page and download the library: Download reksmey/filament-spatie-roles-permissions 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/ */
reksmey / filament-spatie-roles-permissions example snippets
return $form->schema([
...
BelongsToManyMultiSelect::make('roles')->relationship('roles', 'name')
...
...
])
php artisan vendor:publish --tag=filament-spatie-roles-and-permissions-seeders
Then
php artisan db:seed --class=RolesAndPermissionsSeeder
php artisan vendor:publish --tag=filament-spatie-roles-and-permissions-provider
php artisan filament-spatie-roles-permissions:publish-role-resource
bash
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"