@@ -4,15 +4,15 @@ |
||
4 | 4 | |
5 | 5 | class ClearDataSeeder extends Seeder |
6 | 6 | { |
7 | - /** |
|
8 | - * Run the database seeds. |
|
9 | - * |
|
10 | - * @return void |
|
11 | - */ |
|
12 | - public function run() |
|
13 | - { |
|
14 | - $permissions = DB::table('permissions')->whereIn('model', ['settings', 'logs']); |
|
15 | - DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
|
16 | - $permissions->delete(); |
|
17 | - } |
|
7 | + /** |
|
8 | + * Run the database seeds. |
|
9 | + * |
|
10 | + * @return void |
|
11 | + */ |
|
12 | + public function run() |
|
13 | + { |
|
14 | + $permissions = DB::table('permissions')->whereIn('model', ['settings', 'logs']); |
|
15 | + DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
|
16 | + $permissions->delete(); |
|
17 | + } |
|
18 | 18 | } |
@@ -4,16 +4,16 @@ |
||
4 | 4 | |
5 | 5 | class DatabaseSeeder extends Seeder |
6 | 6 | { |
7 | - /** |
|
8 | - * Run the database seeds. |
|
9 | - * |
|
10 | - * @return void |
|
11 | - */ |
|
12 | - public function run() |
|
13 | - { |
|
14 | - $this->call(ClearDataSeeder::class); |
|
15 | - $this->call(LogsTableSeeder::class); |
|
16 | - $this->call(SettingsTableSeeder::class); |
|
17 | - $this->call(AssignRelationsSeeder::class); |
|
18 | - } |
|
7 | + /** |
|
8 | + * Run the database seeds. |
|
9 | + * |
|
10 | + * @return void |
|
11 | + */ |
|
12 | + public function run() |
|
13 | + { |
|
14 | + $this->call(ClearDataSeeder::class); |
|
15 | + $this->call(LogsTableSeeder::class); |
|
16 | + $this->call(SettingsTableSeeder::class); |
|
17 | + $this->call(AssignRelationsSeeder::class); |
|
18 | + } |
|
19 | 19 | } |
@@ -4,64 +4,64 @@ |
||
4 | 4 | |
5 | 5 | class LogsTableSeeder extends Seeder |
6 | 6 | { |
7 | - /** |
|
8 | - * Run the database seeds. |
|
9 | - * |
|
10 | - * @return void |
|
11 | - */ |
|
12 | - public function run() |
|
13 | - { |
|
14 | - /** |
|
15 | - * Insert the permissions related to settings table. |
|
16 | - */ |
|
17 | - DB::table('permissions')->insert( |
|
18 | - [ |
|
19 | - /** |
|
20 | - * Logs model permissions. |
|
21 | - */ |
|
22 | - [ |
|
23 | - 'name' => 'find', |
|
24 | - 'model' => 'logs', |
|
25 | - 'created_at' => \DB::raw('NOW()'), |
|
26 | - 'updated_at' => \DB::raw('NOW()') |
|
27 | - ], |
|
28 | - [ |
|
29 | - 'name' => 'search', |
|
30 | - 'model' => 'logs', |
|
31 | - 'created_at' => \DB::raw('NOW()'), |
|
32 | - 'updated_at' => \DB::raw('NOW()') |
|
33 | - ], |
|
34 | - [ |
|
35 | - 'name' => 'list', |
|
36 | - 'model' => 'logs', |
|
37 | - 'created_at' => \DB::raw('NOW()'), |
|
38 | - 'updated_at' => \DB::raw('NOW()') |
|
39 | - ], |
|
40 | - [ |
|
41 | - 'name' => 'findby', |
|
42 | - 'model' => 'logs', |
|
43 | - 'created_at' => \DB::raw('NOW()'), |
|
44 | - 'updated_at' => \DB::raw('NOW()') |
|
45 | - ], |
|
46 | - [ |
|
47 | - 'name' => 'first', |
|
48 | - 'model' => 'logs', |
|
49 | - 'created_at' => \DB::raw('NOW()'), |
|
50 | - 'updated_at' => \DB::raw('NOW()') |
|
51 | - ], |
|
52 | - [ |
|
53 | - 'name' => 'paginate', |
|
54 | - 'model' => 'logs', |
|
55 | - 'created_at' => \DB::raw('NOW()'), |
|
56 | - 'updated_at' => \DB::raw('NOW()') |
|
57 | - ], |
|
58 | - [ |
|
59 | - 'name' => 'paginateby', |
|
60 | - 'model' => 'logs', |
|
61 | - 'created_at' => \DB::raw('NOW()'), |
|
62 | - 'updated_at' => \DB::raw('NOW()') |
|
63 | - ] |
|
64 | - ] |
|
65 | - ); |
|
66 | - } |
|
7 | + /** |
|
8 | + * Run the database seeds. |
|
9 | + * |
|
10 | + * @return void |
|
11 | + */ |
|
12 | + public function run() |
|
13 | + { |
|
14 | + /** |
|
15 | + * Insert the permissions related to settings table. |
|
16 | + */ |
|
17 | + DB::table('permissions')->insert( |
|
18 | + [ |
|
19 | + /** |
|
20 | + * Logs model permissions. |
|
21 | + */ |
|
22 | + [ |
|
23 | + 'name' => 'find', |
|
24 | + 'model' => 'logs', |
|
25 | + 'created_at' => \DB::raw('NOW()'), |
|
26 | + 'updated_at' => \DB::raw('NOW()') |
|
27 | + ], |
|
28 | + [ |
|
29 | + 'name' => 'search', |
|
30 | + 'model' => 'logs', |
|
31 | + 'created_at' => \DB::raw('NOW()'), |
|
32 | + 'updated_at' => \DB::raw('NOW()') |
|
33 | + ], |
|
34 | + [ |
|
35 | + 'name' => 'list', |
|
36 | + 'model' => 'logs', |
|
37 | + 'created_at' => \DB::raw('NOW()'), |
|
38 | + 'updated_at' => \DB::raw('NOW()') |
|
39 | + ], |
|
40 | + [ |
|
41 | + 'name' => 'findby', |
|
42 | + 'model' => 'logs', |
|
43 | + 'created_at' => \DB::raw('NOW()'), |
|
44 | + 'updated_at' => \DB::raw('NOW()') |
|
45 | + ], |
|
46 | + [ |
|
47 | + 'name' => 'first', |
|
48 | + 'model' => 'logs', |
|
49 | + 'created_at' => \DB::raw('NOW()'), |
|
50 | + 'updated_at' => \DB::raw('NOW()') |
|
51 | + ], |
|
52 | + [ |
|
53 | + 'name' => 'paginate', |
|
54 | + 'model' => 'logs', |
|
55 | + 'created_at' => \DB::raw('NOW()'), |
|
56 | + 'updated_at' => \DB::raw('NOW()') |
|
57 | + ], |
|
58 | + [ |
|
59 | + 'name' => 'paginateby', |
|
60 | + 'model' => 'logs', |
|
61 | + 'created_at' => \DB::raw('NOW()'), |
|
62 | + 'updated_at' => \DB::raw('NOW()') |
|
63 | + ] |
|
64 | + ] |
|
65 | + ); |
|
66 | + } |
|
67 | 67 | } |
@@ -4,19 +4,19 @@ discard block |
||
4 | 4 | |
5 | 5 | class AssignRelationsSeeder extends Seeder |
6 | 6 | { |
7 | - /** |
|
8 | - * Run the database seeds. |
|
9 | - * |
|
10 | - * @return void |
|
11 | - */ |
|
12 | - public function run() |
|
13 | - { |
|
14 | - /** |
|
7 | + /** |
|
8 | + * Run the database seeds. |
|
9 | + * |
|
10 | + * @return void |
|
11 | + */ |
|
12 | + public function run() |
|
13 | + { |
|
14 | + /** |
|
15 | 15 | * Assign the permissions to the admin group. |
16 | 16 | */ |
17 | - $adminGroupId = DB::table('groups')->whereIn('name', 'admin')->select('id')->first()->id; |
|
18 | - DB::table('permissions')->whereIn('model', ['settings', 'logs'])->each(function ($permission) use ($adminGroupId) { |
|
19 | - DB::table('groups_permissions')->insert( |
|
17 | + $adminGroupId = DB::table('groups')->whereIn('name', 'admin')->select('id')->first()->id; |
|
18 | + DB::table('permissions')->whereIn('model', ['settings', 'logs'])->each(function ($permission) use ($adminGroupId) { |
|
19 | + DB::table('groups_permissions')->insert( |
|
20 | 20 | [ |
21 | 21 | 'permission_id' => $permission->id, |
22 | 22 | 'group_id' => $adminGroupId, |
@@ -24,6 +24,6 @@ discard block |
||
24 | 24 | 'updated_at' => \DB::raw('NOW()') |
25 | 25 | ] |
26 | 26 | ); |
27 | - }); |
|
28 | - } |
|
27 | + }); |
|
28 | + } |
|
29 | 29 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * Assign the permissions to the admin group. |
16 | 16 | */ |
17 | 17 | $adminGroupId = DB::table('groups')->whereIn('name', 'admin')->select('id')->first()->id; |
18 | - DB::table('permissions')->whereIn('model', ['settings', 'logs'])->each(function ($permission) use ($adminGroupId) { |
|
18 | + DB::table('permissions')->whereIn('model', ['settings', 'logs'])->each(function($permission) use ($adminGroupId) { |
|
19 | 19 | DB::table('groups_permissions')->insert( |
20 | 20 | [ |
21 | 21 | 'permission_id' => $permission->id, |
@@ -4,70 +4,70 @@ |
||
4 | 4 | |
5 | 5 | class SettingsTableSeeder extends Seeder |
6 | 6 | { |
7 | - /** |
|
8 | - * Run the database seeds. |
|
9 | - * |
|
10 | - * @return void |
|
11 | - */ |
|
12 | - public function run() |
|
13 | - { |
|
14 | - /** |
|
15 | - * Insert the permissions related to settings table. |
|
16 | - */ |
|
17 | - DB::table('permissions')->insert( |
|
18 | - [ |
|
19 | - /** |
|
20 | - * Settings model permissions. |
|
21 | - */ |
|
22 | - [ |
|
23 | - 'name' => 'save', |
|
24 | - 'model' => 'settings', |
|
25 | - 'created_at' => \DB::raw('NOW()'), |
|
26 | - 'updated_at' => \DB::raw('NOW()') |
|
27 | - ], |
|
28 | - [ |
|
29 | - 'name' => 'find', |
|
30 | - 'model' => 'settings', |
|
31 | - 'created_at' => \DB::raw('NOW()'), |
|
32 | - 'updated_at' => \DB::raw('NOW()') |
|
33 | - ], |
|
34 | - [ |
|
35 | - 'name' => 'search', |
|
36 | - 'model' => 'settings', |
|
37 | - 'created_at' => \DB::raw('NOW()'), |
|
38 | - 'updated_at' => \DB::raw('NOW()') |
|
39 | - ], |
|
40 | - [ |
|
41 | - 'name' => 'list', |
|
42 | - 'model' => 'settings', |
|
43 | - 'created_at' => \DB::raw('NOW()'), |
|
44 | - 'updated_at' => \DB::raw('NOW()') |
|
45 | - ], |
|
46 | - [ |
|
47 | - 'name' => 'findby', |
|
48 | - 'model' => 'settings', |
|
49 | - 'created_at' => \DB::raw('NOW()'), |
|
50 | - 'updated_at' => \DB::raw('NOW()') |
|
51 | - ], |
|
52 | - [ |
|
53 | - 'name' => 'first', |
|
54 | - 'model' => 'settings', |
|
55 | - 'created_at' => \DB::raw('NOW()'), |
|
56 | - 'updated_at' => \DB::raw('NOW()') |
|
57 | - ], |
|
58 | - [ |
|
59 | - 'name' => 'paginate', |
|
60 | - 'model' => 'settings', |
|
61 | - 'created_at' => \DB::raw('NOW()'), |
|
62 | - 'updated_at' => \DB::raw('NOW()') |
|
63 | - ], |
|
64 | - [ |
|
65 | - 'name' => 'paginateby', |
|
66 | - 'model' => 'settings', |
|
67 | - 'created_at' => \DB::raw('NOW()'), |
|
68 | - 'updated_at' => \DB::raw('NOW()') |
|
69 | - ] |
|
70 | - ] |
|
71 | - ); |
|
72 | - } |
|
7 | + /** |
|
8 | + * Run the database seeds. |
|
9 | + * |
|
10 | + * @return void |
|
11 | + */ |
|
12 | + public function run() |
|
13 | + { |
|
14 | + /** |
|
15 | + * Insert the permissions related to settings table. |
|
16 | + */ |
|
17 | + DB::table('permissions')->insert( |
|
18 | + [ |
|
19 | + /** |
|
20 | + * Settings model permissions. |
|
21 | + */ |
|
22 | + [ |
|
23 | + 'name' => 'save', |
|
24 | + 'model' => 'settings', |
|
25 | + 'created_at' => \DB::raw('NOW()'), |
|
26 | + 'updated_at' => \DB::raw('NOW()') |
|
27 | + ], |
|
28 | + [ |
|
29 | + 'name' => 'find', |
|
30 | + 'model' => 'settings', |
|
31 | + 'created_at' => \DB::raw('NOW()'), |
|
32 | + 'updated_at' => \DB::raw('NOW()') |
|
33 | + ], |
|
34 | + [ |
|
35 | + 'name' => 'search', |
|
36 | + 'model' => 'settings', |
|
37 | + 'created_at' => \DB::raw('NOW()'), |
|
38 | + 'updated_at' => \DB::raw('NOW()') |
|
39 | + ], |
|
40 | + [ |
|
41 | + 'name' => 'list', |
|
42 | + 'model' => 'settings', |
|
43 | + 'created_at' => \DB::raw('NOW()'), |
|
44 | + 'updated_at' => \DB::raw('NOW()') |
|
45 | + ], |
|
46 | + [ |
|
47 | + 'name' => 'findby', |
|
48 | + 'model' => 'settings', |
|
49 | + 'created_at' => \DB::raw('NOW()'), |
|
50 | + 'updated_at' => \DB::raw('NOW()') |
|
51 | + ], |
|
52 | + [ |
|
53 | + 'name' => 'first', |
|
54 | + 'model' => 'settings', |
|
55 | + 'created_at' => \DB::raw('NOW()'), |
|
56 | + 'updated_at' => \DB::raw('NOW()') |
|
57 | + ], |
|
58 | + [ |
|
59 | + 'name' => 'paginate', |
|
60 | + 'model' => 'settings', |
|
61 | + 'created_at' => \DB::raw('NOW()'), |
|
62 | + 'updated_at' => \DB::raw('NOW()') |
|
63 | + ], |
|
64 | + [ |
|
65 | + 'name' => 'paginateby', |
|
66 | + 'model' => 'settings', |
|
67 | + 'created_at' => \DB::raw('NOW()'), |
|
68 | + 'updated_at' => \DB::raw('NOW()') |
|
69 | + ] |
|
70 | + ] |
|
71 | + ); |
|
72 | + } |
|
73 | 73 | } |
@@ -4,88 +4,88 @@ |
||
4 | 4 | |
5 | 5 | class PushNotificationsDevicesTableSeeder extends Seeder |
6 | 6 | { |
7 | - /** |
|
8 | - * Run the database seeds. |
|
9 | - * |
|
10 | - * @return void |
|
11 | - */ |
|
12 | - public function run() |
|
13 | - { |
|
14 | - /** |
|
15 | - * Insert the permissions related to settings table. |
|
16 | - */ |
|
17 | - DB::table('permissions')->insert( |
|
18 | - [ |
|
19 | - /** |
|
20 | - * pushNotificationDevices model permissions. |
|
21 | - */ |
|
22 | - [ |
|
23 | - 'name' => 'find', |
|
24 | - 'model' => 'pushNotificationDevices', |
|
25 | - 'created_at' => \DB::raw('NOW()'), |
|
26 | - 'updated_at' => \DB::raw('NOW()') |
|
27 | - ], |
|
28 | - [ |
|
29 | - 'name' => 'search', |
|
30 | - 'model' => 'pushNotificationDevices', |
|
31 | - 'created_at' => \DB::raw('NOW()'), |
|
32 | - 'updated_at' => \DB::raw('NOW()') |
|
33 | - ], |
|
34 | - [ |
|
35 | - 'name' => 'list', |
|
36 | - 'model' => 'pushNotificationDevices', |
|
37 | - 'created_at' => \DB::raw('NOW()'), |
|
38 | - 'updated_at' => \DB::raw('NOW()') |
|
39 | - ], |
|
40 | - [ |
|
41 | - 'name' => 'findby', |
|
42 | - 'model' => 'pushNotificationDevices', |
|
43 | - 'created_at' => \DB::raw('NOW()'), |
|
44 | - 'updated_at' => \DB::raw('NOW()') |
|
45 | - ], |
|
46 | - [ |
|
47 | - 'name' => 'first', |
|
48 | - 'model' => 'pushNotificationDevices', |
|
49 | - 'created_at' => \DB::raw('NOW()'), |
|
50 | - 'updated_at' => \DB::raw('NOW()') |
|
51 | - ], |
|
52 | - [ |
|
53 | - 'name' => 'paginate', |
|
54 | - 'model' => 'pushNotificationDevices', |
|
55 | - 'created_at' => \DB::raw('NOW()'), |
|
56 | - 'updated_at' => \DB::raw('NOW()') |
|
57 | - ], |
|
58 | - [ |
|
59 | - 'name' => 'paginateby', |
|
60 | - 'model' => 'pushNotificationDevices', |
|
61 | - 'created_at' => \DB::raw('NOW()'), |
|
62 | - 'updated_at' => \DB::raw('NOW()') |
|
63 | - ], |
|
64 | - [ |
|
65 | - 'name' => 'save', |
|
66 | - 'model' => 'pushNotificationDevices', |
|
67 | - 'created_at' => \DB::raw('NOW()'), |
|
68 | - 'updated_at' => \DB::raw('NOW()') |
|
69 | - ], |
|
70 | - [ |
|
71 | - 'name' => 'delete', |
|
72 | - 'model' => 'pushNotificationDevices', |
|
73 | - 'created_at' => \DB::raw('NOW()'), |
|
74 | - 'updated_at' => \DB::raw('NOW()') |
|
75 | - ], |
|
76 | - [ |
|
77 | - 'name' => 'deleted', |
|
78 | - 'model' => 'pushNotificationDevices', |
|
79 | - 'created_at' => \DB::raw('NOW()'), |
|
80 | - 'updated_at' => \DB::raw('NOW()') |
|
81 | - ], |
|
82 | - [ |
|
83 | - 'name' => 'restore', |
|
84 | - 'model' => 'pushNotificationDevices', |
|
85 | - 'created_at' => \DB::raw('NOW()'), |
|
86 | - 'updated_at' => \DB::raw('NOW()') |
|
87 | - ] |
|
88 | - ] |
|
89 | - ); |
|
90 | - } |
|
7 | + /** |
|
8 | + * Run the database seeds. |
|
9 | + * |
|
10 | + * @return void |
|
11 | + */ |
|
12 | + public function run() |
|
13 | + { |
|
14 | + /** |
|
15 | + * Insert the permissions related to settings table. |
|
16 | + */ |
|
17 | + DB::table('permissions')->insert( |
|
18 | + [ |
|
19 | + /** |
|
20 | + * pushNotificationDevices model permissions. |
|
21 | + */ |
|
22 | + [ |
|
23 | + 'name' => 'find', |
|
24 | + 'model' => 'pushNotificationDevices', |
|
25 | + 'created_at' => \DB::raw('NOW()'), |
|
26 | + 'updated_at' => \DB::raw('NOW()') |
|
27 | + ], |
|
28 | + [ |
|
29 | + 'name' => 'search', |
|
30 | + 'model' => 'pushNotificationDevices', |
|
31 | + 'created_at' => \DB::raw('NOW()'), |
|
32 | + 'updated_at' => \DB::raw('NOW()') |
|
33 | + ], |
|
34 | + [ |
|
35 | + 'name' => 'list', |
|
36 | + 'model' => 'pushNotificationDevices', |
|
37 | + 'created_at' => \DB::raw('NOW()'), |
|
38 | + 'updated_at' => \DB::raw('NOW()') |
|
39 | + ], |
|
40 | + [ |
|
41 | + 'name' => 'findby', |
|
42 | + 'model' => 'pushNotificationDevices', |
|
43 | + 'created_at' => \DB::raw('NOW()'), |
|
44 | + 'updated_at' => \DB::raw('NOW()') |
|
45 | + ], |
|
46 | + [ |
|
47 | + 'name' => 'first', |
|
48 | + 'model' => 'pushNotificationDevices', |
|
49 | + 'created_at' => \DB::raw('NOW()'), |
|
50 | + 'updated_at' => \DB::raw('NOW()') |
|
51 | + ], |
|
52 | + [ |
|
53 | + 'name' => 'paginate', |
|
54 | + 'model' => 'pushNotificationDevices', |
|
55 | + 'created_at' => \DB::raw('NOW()'), |
|
56 | + 'updated_at' => \DB::raw('NOW()') |
|
57 | + ], |
|
58 | + [ |
|
59 | + 'name' => 'paginateby', |
|
60 | + 'model' => 'pushNotificationDevices', |
|
61 | + 'created_at' => \DB::raw('NOW()'), |
|
62 | + 'updated_at' => \DB::raw('NOW()') |
|
63 | + ], |
|
64 | + [ |
|
65 | + 'name' => 'save', |
|
66 | + 'model' => 'pushNotificationDevices', |
|
67 | + 'created_at' => \DB::raw('NOW()'), |
|
68 | + 'updated_at' => \DB::raw('NOW()') |
|
69 | + ], |
|
70 | + [ |
|
71 | + 'name' => 'delete', |
|
72 | + 'model' => 'pushNotificationDevices', |
|
73 | + 'created_at' => \DB::raw('NOW()'), |
|
74 | + 'updated_at' => \DB::raw('NOW()') |
|
75 | + ], |
|
76 | + [ |
|
77 | + 'name' => 'deleted', |
|
78 | + 'model' => 'pushNotificationDevices', |
|
79 | + 'created_at' => \DB::raw('NOW()'), |
|
80 | + 'updated_at' => \DB::raw('NOW()') |
|
81 | + ], |
|
82 | + [ |
|
83 | + 'name' => 'restore', |
|
84 | + 'model' => 'pushNotificationDevices', |
|
85 | + 'created_at' => \DB::raw('NOW()'), |
|
86 | + 'updated_at' => \DB::raw('NOW()') |
|
87 | + ] |
|
88 | + ] |
|
89 | + ); |
|
90 | + } |
|
91 | 91 | } |
@@ -4,15 +4,15 @@ |
||
4 | 4 | |
5 | 5 | class ClearDataSeeder extends Seeder |
6 | 6 | { |
7 | - /** |
|
8 | - * Run the database seeds. |
|
9 | - * |
|
10 | - * @return void |
|
11 | - */ |
|
12 | - public function run() |
|
13 | - { |
|
14 | - $permissions = DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
15 | - DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
|
16 | - $permissions->delete(); |
|
17 | - } |
|
7 | + /** |
|
8 | + * Run the database seeds. |
|
9 | + * |
|
10 | + * @return void |
|
11 | + */ |
|
12 | + public function run() |
|
13 | + { |
|
14 | + $permissions = DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
15 | + DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
|
16 | + $permissions->delete(); |
|
17 | + } |
|
18 | 18 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function run() |
13 | 13 | { |
14 | - $permissions = DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
14 | + $permissions = DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
15 | 15 | DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
16 | 16 | $permissions->delete(); |
17 | 17 | } |
@@ -4,16 +4,16 @@ |
||
4 | 4 | |
5 | 5 | class DatabaseSeeder extends Seeder |
6 | 6 | { |
7 | - /** |
|
8 | - * Run the database seeds. |
|
9 | - * |
|
10 | - * @return void |
|
11 | - */ |
|
12 | - public function run() |
|
13 | - { |
|
14 | - $this->call(ClearDataSeeder::class); |
|
15 | - $this->call(NotificationsTableSeeder::class); |
|
16 | - $this->call(PushNotificationsDevicesTableSeeder::class); |
|
17 | - $this->call(AssignRelationsSeeder::class); |
|
18 | - } |
|
7 | + /** |
|
8 | + * Run the database seeds. |
|
9 | + * |
|
10 | + * @return void |
|
11 | + */ |
|
12 | + public function run() |
|
13 | + { |
|
14 | + $this->call(ClearDataSeeder::class); |
|
15 | + $this->call(NotificationsTableSeeder::class); |
|
16 | + $this->call(PushNotificationsDevicesTableSeeder::class); |
|
17 | + $this->call(AssignRelationsSeeder::class); |
|
18 | + } |
|
19 | 19 | } |
@@ -4,19 +4,19 @@ discard block |
||
4 | 4 | |
5 | 5 | class AssignRelationsSeeder extends Seeder |
6 | 6 | { |
7 | - /** |
|
8 | - * Run the database seeds. |
|
9 | - * |
|
10 | - * @return void |
|
11 | - */ |
|
12 | - public function run() |
|
13 | - { |
|
14 | - /** |
|
7 | + /** |
|
8 | + * Run the database seeds. |
|
9 | + * |
|
10 | + * @return void |
|
11 | + */ |
|
12 | + public function run() |
|
13 | + { |
|
14 | + /** |
|
15 | 15 | * Assign the permissions to the admin group. |
16 | 16 | */ |
17 | - $adminGroupId = DB::table('groups')->whereIn('name', 'admin')->select('id')->first()->id; |
|
18 | - DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function ($permission) use ($adminGroupId) { |
|
19 | - DB::table('groups_permissions')->insert( |
|
17 | + $adminGroupId = DB::table('groups')->whereIn('name', 'admin')->select('id')->first()->id; |
|
18 | + DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function ($permission) use ($adminGroupId) { |
|
19 | + DB::table('groups_permissions')->insert( |
|
20 | 20 | [ |
21 | 21 | 'permission_id' => $permission->id, |
22 | 22 | 'group_id' => $adminGroupId, |
@@ -24,6 +24,6 @@ discard block |
||
24 | 24 | 'updated_at' => \DB::raw('NOW()') |
25 | 25 | ] |
26 | 26 | ); |
27 | - }); |
|
28 | - } |
|
27 | + }); |
|
28 | + } |
|
29 | 29 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * Assign the permissions to the admin group. |
16 | 16 | */ |
17 | 17 | $adminGroupId = DB::table('groups')->whereIn('name', 'admin')->select('id')->first()->id; |
18 | - DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function ($permission) use ($adminGroupId) { |
|
18 | + DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function($permission) use ($adminGroupId) { |
|
19 | 19 | DB::table('groups_permissions')->insert( |
20 | 20 | [ |
21 | 21 | 'permission_id' => $permission->id, |