File tree 5 files changed +27
-305
lines changed
workbench/bootstrap/cache 5 files changed +27
-305
lines changed Original file line number Diff line number Diff line change 2
2
3
3
return [
4
4
5
- /*
6
- |--------------------------------------------------------------------------
7
- | Roles
8
- |--------------------------------------------------------------------------
9
- */
10
- 'roles ' => [
11
- 'entity ' => App \Entities \Role::class,
12
- ],
13
5
/*
14
6
|--------------------------------------------------------------------------
15
7
| Permissions
24
16
'entity ' => LaravelDoctrine \ACL \Permissions \Permission::class,
25
17
'list ' => [],
26
18
],
19
+
20
+
21
+ /*
22
+ |--------------------------------------------------------------------------
23
+ | Roles
24
+ |--------------------------------------------------------------------------
25
+ */
26
+ 'roles ' => [
27
+ 'entity ' => App \Entities \Role::class,
28
+ ],
29
+
27
30
/*
28
31
|--------------------------------------------------------------------------
29
32
| Organisations
Original file line number Diff line number Diff line change 10
10
use LaravelDoctrine \ACL \Mappings \RegisterMappedEventSubscribers ;
11
11
use LaravelDoctrine \ORM \DoctrineManager ;
12
12
13
+ use function config_path ;
14
+
13
15
use const DIRECTORY_SEPARATOR ;
14
16
15
17
class AclServiceProvider extends ServiceProvider
16
18
{
19
+ public function boot (): void
20
+ {
21
+ $ this ->publishConfig ();
22
+ }
23
+
17
24
public function register (): void
18
25
{
19
26
$ this ->mergeConfig ();
@@ -56,6 +63,13 @@ protected function registerGatePermissions(): void
56
63
});
57
64
}
58
65
66
+ protected function publishConfig (): void
67
+ {
68
+ $ this ->publishes ([
69
+ $ this ->getConfigPath () => config_path ('acl.php ' ),
70
+ ], 'config ' );
71
+ }
72
+
59
73
protected function mergeConfig (): void
60
74
{
61
75
$ this ->mergeConfigFrom (
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ class Config implements PermissionDriver
11
11
protected Collection $ collection ;
12
12
13
13
/** @var array<string> */
14
- public function __construct (protected array $ permissions )
14
+ public function __construct (array $ permissions )
15
15
{
16
- $ this ->collection = new Collection ($ this -> permissions );
16
+ $ this ->collection = new Collection ($ permissions );
17
17
}
18
18
19
19
public function getAllPermissions (): Collection
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments