|
11 | 11 | * Custom permissions
|
12 | 12 | */
|
13 | 13 | 'custom-permissions' => [
|
14 |
| - // |
| 14 | + |
15 | 15 | ],
|
16 | 16 |
|
17 | 17 | /**
|
18 |
| - * Define controller namespace |
| 18 | + * Permission generate controller's namespace |
19 | 19 | *
|
20 | 20 | * By Default permissions will be generated from all controller's routes
|
21 |
| - * |
22 |
| - * [Note: permissions will be generated from those controller which contains the defined whole or prefix of controller namespace] |
23 | 21 | */
|
24 |
| - 'controller-namespace-prefixes' => [ |
| 22 | + 'permission-generate-controllers' => [ |
25 | 23 | 'App\Http\Controllers',
|
26 | 24 | ],
|
27 | 25 |
|
28 | 26 | /**
|
29 |
| - * Exclude routes by route name |
30 |
| - */ |
31 |
| - 'exclude-routes' => [ |
32 |
| - // route.name |
33 |
| - ], |
34 |
| - |
35 |
| - /** |
36 |
| - * Exclude routes by controller whole namespace or sub/prefix of controller namespace |
| 27 | + * Exclude routes by controller's namespace |
37 | 28 | *
|
38 | 29 | * By default all auth controller's routes will be excluded from being generated as permission names
|
39 | 30 | *
|
40 |
| - * [Note: We can exclude routes by defining controller name or namespace-prefix. All the routes associated with controller will be excluded] |
| 31 | + * [Note: Exclude routes by defining App\Http\Controller\SomeController::class or namespace-prefix] |
41 | 32 | */
|
42 | 33 | 'exclude-controllers' => [
|
43 |
| - // exclude every route which associate with the prefix of controller namespace |
44 | 34 | 'App\Http\Controllers\Auth',
|
45 | 35 | ],
|
46 | 36 |
|
47 | 37 | /**
|
48 |
| - * Cache the rendered permission names |
| 38 | + * Exclude routes by route name |
49 | 39 | */
|
50 |
| - 'cache-permissions' => [ |
51 |
| - 'cacheable' => true, |
52 |
| - 'cache-driver' => env('CACHE_DRIVER', 'file'), |
| 40 | + 'exclude-routes' => [ |
| 41 | + // route.name |
53 | 42 | ],
|
54 | 43 |
|
55 | 44 | /**
|
56 |
| - * Permission card size |
57 |
| - * |
58 |
| - * [NT: Predefined permission cards works on bootstrap] |
| 45 | + * Cache the rendered permission names |
59 | 46 | */
|
60 |
| - 'card-size-class' => 'col-md-3 col-lg-3 col-sm-12', |
| 47 | + 'cache-permissions' => true, |
61 | 48 |
|
62 | 49 | /**
|
63 |
| - * These tage used to generate permissions on given resources |
| 50 | + * --------------------------------------------------------------------------------------------------------- |
| 51 | + * This config only used if you want to generate permission names from resources instead of routes |
| 52 | + * --------------------------------------------------------------------------------------------------------- |
| 53 | + * |
| 54 | + * These actions used to generate permissions on given resources |
64 | 55 | *
|
65 |
| - * [Ex: create-posts,'edit-posts','view-list-posts' etc] |
| 56 | + * [Ex: If resource is posts, then permission will be (create-posts,'edit-posts','view-posts') etc] |
66 | 57 | */
|
67 |
| - 'resource-permission-tags' => [ |
| 58 | + 'resource-actions' => [ |
68 | 59 | 'create',
|
69 | 60 | 'edit',
|
70 | 61 | 'show',
|
71 | 62 | 'delete',
|
72 |
| - 'view-list' |
| 63 | + 'view', |
73 | 64 | ],
|
74 | 65 | ];
|
0 commit comments