120 lines
4.1 KiB
PHP
120 lines
4.1 KiB
PHP
<?php
|
|
|
|
return [
|
|
|
|
'models' => [
|
|
|
|
/*
|
|
* When using the "HasPermissions" trait from this package, we need to know which
|
|
* Eloquent model should be used to retrieve your permissions. Of course, it
|
|
* is often just the "Permission model" here, but you may use whatever you like.
|
|
*
|
|
* The model you want to use as a Permission model needs to implement
|
|
* `Spatie\Permission\Contracts\Permission`.
|
|
*/
|
|
|
|
'permission' => \App\Models\Permission::class,
|
|
|
|
/*
|
|
* When using the "HasRoles" trait from this package, we need to know which
|
|
* Eloquent model should be used to retrieve your roles. Of course, it
|
|
* is often just the "Role model" here, but you may use whatever you like.
|
|
*
|
|
* The model you want to use as a Role model needs to implement
|
|
* `Spatie\Permission\Contracts\Role`.
|
|
*/
|
|
|
|
'role' => \App\Models\Role::class,
|
|
|
|
],
|
|
|
|
'table_names' => [
|
|
|
|
/*
|
|
* When using the "HasRoles" trait from this package, we need to know which
|
|
* table should be used to retrieve your roles. We have chosen a basic
|
|
* default value but you can easily change it to any table you like.
|
|
*/
|
|
|
|
'roles' => 'roles',
|
|
|
|
/*
|
|
* When using the "HasRoles" trait from this package, we need to know which
|
|
* table should be used to retrieve your permissions. We have chosen a basic
|
|
* default value but you can easily change it to any table you like.
|
|
*/
|
|
|
|
'permissions' => 'permissions',
|
|
|
|
/*
|
|
* When using the "HasRoles" trait from this package, we need to know which
|
|
* table should be used to retrieve your roles permissions. We have chosen a
|
|
* basic default value but you can easily change it to any table you like.
|
|
*/
|
|
|
|
'role_has_permissions' => 'role_has_permissions',
|
|
|
|
/*
|
|
* When using the "HasPermissions" trait from this package, we need to know which
|
|
* table should be used to retrieve your models permissions. We have chosen a
|
|
* basic default value but you can easily change it to any table you like.
|
|
*/
|
|
|
|
'model_has_permissions' => 'model_has_permissions',
|
|
|
|
/*
|
|
* When using the "HasPermissions" trait from this package, we need to know which
|
|
* table should be used to retrieve your models roles. We have chosen a
|
|
* basic default value but you can easily change it to any table you like.
|
|
*/
|
|
|
|
'model_has_roles' => 'model_has_roles',
|
|
],
|
|
|
|
'column_names' => [
|
|
/*
|
|
* Change this if you want to name the related pivots other than defaults
|
|
*/
|
|
'role_pivot_key' => null, //default 'role_id',
|
|
'permission_pivot_key' => null, //default 'permission_id',
|
|
|
|
/*
|
|
* Change this if you want to name the related model foreign key other than
|
|
* defaults
|
|
*/
|
|
'model_morph_key' => 'model_id',
|
|
'model_key' => null, // default 'id',
|
|
|
|
/*
|
|
* Change this if you want to use the teams feature. The default is to
|
|
* use the 'team_id' column. If you are using a custom column name, set
|
|
* it here.
|
|
*/
|
|
'team_foreign_key' => 'tenant_id',
|
|
],
|
|
|
|
/*
|
|
* When set to true, the method for checking permissions will be registered on the
|
|
* gate. Set this to false if you want to implement custom logic for checking
|
|
* permissions.
|
|
*/
|
|
'register_permission_check_method' => true,
|
|
|
|
/*
|
|
* When set to true, Laravel\Passport\PassportServiceProvider will be registered
|
|
* automatically. Set this to false if you don't use Passport or want to
|
|
* register it yourself.
|
|
*/
|
|
'register_passport_client_scopes' => false,
|
|
|
|
/*
|
|
* When set to true the package will cache the permissions and roles for each
|
|
* user. This can improve performance but will use more memory.
|
|
*/
|
|
'cache' => [
|
|
'expiration_time' => \DateInterval::createFromDateString('24 hours'),
|
|
'key' => 'spatie.permission.cache',
|
|
'store' => 'file',
|
|
],
|
|
];
|