This repository was archived by the owner on Jun 29, 2026. It is now read-only.
forked from mostafamaklad/laravel-permission-mongodb
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpermission.php
More file actions
83 lines (64 loc) · 2.78 KB
/
Copy pathpermission.php
File metadata and controls
83 lines (64 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
return [
'models' => [
/*
* When using the "HasRoles" 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 but you may use whatever you like.
*
* The model you want to use as a Permission model needs to implement the
* `Maklad\Permission\Contracts\Permission` contract.
*/
'permission' => Maklad\Permission\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 but you may use whatever you like.
*
* The model you want to use as a Role model needs to implement the
* `Maklad\Permission\Contracts\Role` contract.
*/
'role' => Maklad\Permission\Models\Role::class,
],
'collection_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 may 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 may easily change it to any table you like.
*/
'permissions' => 'permissions',
],
/*
* Cache configuration for permissions.
*
* - store: The cache store to use (null for default, 'redis', 'array', 'file', etc.)
* - expiration_time: Cache duration in minutes (default: 24 hours)
* - key: The cache key prefix
*/
'cache' => [
'store' => env('PERMISSION_CACHE_STORE', null),
'expiration_time' => env('PERMISSION_CACHE_EXPIRATION', 60 * 24),
'key' => env('PERMISSION_CACHE_KEY', 'maklad.permission.cache'),
],
// Deprecated: Use cache.expiration_time instead
'cache_expiration_time' => 60 * 24,
/*
* By default we'll make an entry in the application log when the permissions
* could not be loaded. Normally this only occurs while installing the packages.
*
* If for some reason you want to disable that logging, set this value to false.
*/
'log_registration_exception' => true,
/*
* When set to true, the required permission/role names are added to the exception
* message. This could be considered an information leak in some contexts, so
* the default setting is false here for optimum safety.
*/
'display_permission_in_exception' => false,
];