PHP code example of cboxdk / lighthouse-spatie-permissions
1. Go to this page and download the library: Download cboxdk/lighthouse-spatie-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/ */
cboxdk / lighthouse-spatie-permissions example snippets
return [
/*
* Define where the schema will be stored
*/
'schema' => null,
/*
* Determine the guard to use as default guard_name when creating roles and permissions
* Defaults to api
*/
'guard' => env('LIGHTHOUSE_PERMISSION_GUARD', 'api'),
/*
* Restrict mutations to specific role
*/
'restrict' => [
'role' => env('LIGHTHOUSE_PERMISSION_RESTRICT_MUTATIONS','admin')
],
'users' => [
'table' => env('LIGHTHOUSE_PERMISSION_USERS_TABLE', 'users'),
],
];