Completed
Push — master ( 5a2f77...5ca5fe )
by Sherif
04:10
created
src/Modules/V1/Notifications/Database/Seeds/NotificationsDatabaseSeeder.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@
 block discarded – undo
6 6
 
7 7
 class NotificationsDatabaseSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        $this->call(ClearDataSeeder::class);
17
-    	$this->call(NotificationsTableSeeder::class);
18
-    	$this->call(PushNotificationsDevicesTableSeeder::class);
19
-        $this->call(AssignRelationsSeeder::class);
20
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		$this->call(ClearDataSeeder::class);
17
+		$this->call(NotificationsTableSeeder::class);
18
+		$this->call(PushNotificationsDevicesTableSeeder::class);
19
+		$this->call(AssignRelationsSeeder::class);
20
+	}
21 21
 }
Please login to merge, or discard this patch.
src/Modules/V1/Notifications/Database/Seeds/AssignRelationsSeeder.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         /**
22 22
          * Assign the permissions to the admin group.
23 23
          */
24
-        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function ($permission) use ($adminGroupId) {
24
+        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function($permission) use ($adminGroupId) {
25 25
         	\DB::table('groups_permissions')->insert(
26 26
 				[
27 27
 				'permission_id' => $permission->id,
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -6,20 +6,20 @@  discard block
 block discarded – undo
6 6
 
7 7
 class AssignRelationsSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {	
16
-    	$adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id;
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{	
16
+		$adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id;
17 17
 
18
-        /**
19
-         * Assign the permissions to the admin group.
20
-         */
21
-        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function ($permission) use ($adminGroupId) {
22
-        	\DB::table('groups_permissions')->insert(
18
+		/**
19
+		 * Assign the permissions to the admin group.
20
+		 */
21
+		\DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['notifications', 'pushNotificationDevices'])->each(function ($permission) use ($adminGroupId) {
22
+			\DB::table('groups_permissions')->insert(
23 23
 				[
24 24
 				'permission_id' => $permission->id,
25 25
 				'group_id'      => $adminGroupId,
@@ -27,6 +27,6 @@  discard block
 block discarded – undo
27 27
 				'updated_at'    => \DB::raw('NOW()')
28 28
 				]
29 29
 			);
30
-        });
31
-    }
30
+		});
31
+	}
32 32
 }
Please login to merge, or discard this patch.
src/Modules/V1/Notifications/Database/Seeds/NotificationsTableSeeder.php 1 patch
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -6,76 +6,76 @@
 block discarded – undo
6 6
 
7 7
 class NotificationsTableSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-    	/**
17
-         * Insert the permissions related to settings table.
18
-         */
19
-        \DB::table('permissions')->insert(
20
-        	[
21
-        		/**
22
-        		 * notifications model permissions.
23
-        		 */
24
-	        	[
25
-	        	'name'       => 'find',
26
-	        	'model'      => 'notifications',
27
-	        	'created_at' => \DB::raw('NOW()'),
28
-	        	'updated_at' => \DB::raw('NOW()')
29
-	        	],
30
-	        	[
31
-	        	'name'       => 'search',
32
-	        	'model'      => 'notifications',
33
-	        	'created_at' => \DB::raw('NOW()'),
34
-	        	'updated_at' => \DB::raw('NOW()')
35
-	        	],
36
-	        	[
37
-	        	'name'       => 'list',
38
-	        	'model'      => 'notifications',
39
-	        	'created_at' => \DB::raw('NOW()'),
40
-	        	'updated_at' => \DB::raw('NOW()')
41
-	        	],
42
-	        	[
43
-	        	'name'       => 'findby',
44
-	        	'model'      => 'notifications',
45
-	        	'created_at' => \DB::raw('NOW()'),
46
-	        	'updated_at' => \DB::raw('NOW()')
47
-	        	],
48
-	        	[
49
-	        	'name'       => 'first',
50
-	        	'model'      => 'notifications',
51
-	        	'created_at' => \DB::raw('NOW()'),
52
-	        	'updated_at' => \DB::raw('NOW()')
53
-	        	],
54
-	        	[
55
-	        	'name'       => 'paginate',
56
-	        	'model'      => 'notifications',
57
-	        	'created_at' => \DB::raw('NOW()'),
58
-	        	'updated_at' => \DB::raw('NOW()')
59
-	        	],
60
-	        	[
61
-	        	'name'       => 'paginateby',
62
-	        	'model'      => 'notifications',
63
-	        	'created_at' => \DB::raw('NOW()'),
64
-	        	'updated_at' => \DB::raw('NOW()')
65
-	        	],
66
-	        	[
67
-	        	'name'       => 'notified',
68
-	        	'model'      => 'notifications',
69
-	        	'created_at' => \DB::raw('NOW()'),
70
-	        	'updated_at' => \DB::raw('NOW()')
71
-	        	],
72
-	        	[
73
-	        	'name'       => 'notifyall',
74
-	        	'model'      => 'notifications',
75
-	        	'created_at' => \DB::raw('NOW()'),
76
-	        	'updated_at' => \DB::raw('NOW()')
77
-	        	]
78
-        	]
79
-        );
80
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		/**
17
+		 * Insert the permissions related to settings table.
18
+		 */
19
+		\DB::table('permissions')->insert(
20
+			[
21
+				/**
22
+				 * notifications model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'find',
26
+				'model'      => 'notifications',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'search',
32
+				'model'      => 'notifications',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+				[
37
+				'name'       => 'list',
38
+				'model'      => 'notifications',
39
+				'created_at' => \DB::raw('NOW()'),
40
+				'updated_at' => \DB::raw('NOW()')
41
+				],
42
+				[
43
+				'name'       => 'findby',
44
+				'model'      => 'notifications',
45
+				'created_at' => \DB::raw('NOW()'),
46
+				'updated_at' => \DB::raw('NOW()')
47
+				],
48
+				[
49
+				'name'       => 'first',
50
+				'model'      => 'notifications',
51
+				'created_at' => \DB::raw('NOW()'),
52
+				'updated_at' => \DB::raw('NOW()')
53
+				],
54
+				[
55
+				'name'       => 'paginate',
56
+				'model'      => 'notifications',
57
+				'created_at' => \DB::raw('NOW()'),
58
+				'updated_at' => \DB::raw('NOW()')
59
+				],
60
+				[
61
+				'name'       => 'paginateby',
62
+				'model'      => 'notifications',
63
+				'created_at' => \DB::raw('NOW()'),
64
+				'updated_at' => \DB::raw('NOW()')
65
+				],
66
+				[
67
+				'name'       => 'notified',
68
+				'model'      => 'notifications',
69
+				'created_at' => \DB::raw('NOW()'),
70
+				'updated_at' => \DB::raw('NOW()')
71
+				],
72
+				[
73
+				'name'       => 'notifyall',
74
+				'model'      => 'notifications',
75
+				'created_at' => \DB::raw('NOW()'),
76
+				'updated_at' => \DB::raw('NOW()')
77
+				]
78
+			]
79
+		);
80
+	}
81 81
 }
Please login to merge, or discard this patch.
src/Modules/V1/Acl/Database/Seeds/AclDatabaseSeeder.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
 
7 7
 class AclDatabaseSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        $this->call(ClearDataSeeder::class);
17
-    	$this->call(UsersTableSeeder::class);
18
-    	$this->call(GroupsTableSeeder::class);
19
-    	$this->call(PermissionsTableSeeder::class);
20
-    	$this->call(AssignRelationsSeeder::class);
21
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		$this->call(ClearDataSeeder::class);
17
+		$this->call(UsersTableSeeder::class);
18
+		$this->call(GroupsTableSeeder::class);
19
+		$this->call(PermissionsTableSeeder::class);
20
+		$this->call(AssignRelationsSeeder::class);
21
+	}
22 22
 }
Please login to merge, or discard this patch.
src/Modules/V1/Acl/Database/Seeds/PermissionsTableSeeder.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -6,64 +6,64 @@
 block discarded – undo
6 6
 
7 7
 class PermissionsTableSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-    	/**
17
-         * Insert the permissions related to permissions table.
18
-         */
19
-        \DB::table('permissions')->insert(
20
-        	[
21
-        		/**
22
-        		 * Permissions model permissions.
23
-        		 */
24
-        		[
25
-	        	'name'       => 'find',
26
-	        	'model'      => 'permissions',
27
-	        	'created_at' => \DB::raw('NOW()'),
28
-	        	'updated_at' => \DB::raw('NOW()')
29
-	        	],
30
-	        	[
31
-	        	'name'       => 'search',
32
-	        	'model'      => 'permissions',
33
-	        	'created_at' => \DB::raw('NOW()'),
34
-	        	'updated_at' => \DB::raw('NOW()')
35
-	        	],
36
-	        	[
37
-	        	'name'       => 'list',
38
-	        	'model'      => 'permissions',
39
-	        	'created_at' => \DB::raw('NOW()'),
40
-	        	'updated_at' => \DB::raw('NOW()')
41
-	        	],
42
-	        	[
43
-	        	'name'       => 'findby',
44
-	        	'model'      => 'permissions',
45
-	        	'created_at' => \DB::raw('NOW()'),
46
-	        	'updated_at' => \DB::raw('NOW()')
47
-	        	],
48
-	        	[
49
-	        	'name'       => 'first',
50
-	        	'model'      => 'permissions',
51
-	        	'created_at' => \DB::raw('NOW()'),
52
-	        	'updated_at' => \DB::raw('NOW()')
53
-	        	],
54
-	        	[
55
-	        	'name'       => 'paginate',
56
-	        	'model'      => 'permissions',
57
-	        	'created_at' => \DB::raw('NOW()'),
58
-	        	'updated_at' => \DB::raw('NOW()')
59
-	        	],
60
-	        	[
61
-	        	'name'       => 'paginateby',
62
-	        	'model'      => 'permissions',
63
-	        	'created_at' => \DB::raw('NOW()'),
64
-	        	'updated_at' => \DB::raw('NOW()')
65
-	        	]
66
-        	]
67
-        );
68
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		/**
17
+		 * Insert the permissions related to permissions table.
18
+		 */
19
+		\DB::table('permissions')->insert(
20
+			[
21
+				/**
22
+				 * Permissions model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'find',
26
+				'model'      => 'permissions',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'search',
32
+				'model'      => 'permissions',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+				[
37
+				'name'       => 'list',
38
+				'model'      => 'permissions',
39
+				'created_at' => \DB::raw('NOW()'),
40
+				'updated_at' => \DB::raw('NOW()')
41
+				],
42
+				[
43
+				'name'       => 'findby',
44
+				'model'      => 'permissions',
45
+				'created_at' => \DB::raw('NOW()'),
46
+				'updated_at' => \DB::raw('NOW()')
47
+				],
48
+				[
49
+				'name'       => 'first',
50
+				'model'      => 'permissions',
51
+				'created_at' => \DB::raw('NOW()'),
52
+				'updated_at' => \DB::raw('NOW()')
53
+				],
54
+				[
55
+				'name'       => 'paginate',
56
+				'model'      => 'permissions',
57
+				'created_at' => \DB::raw('NOW()'),
58
+				'updated_at' => \DB::raw('NOW()')
59
+				],
60
+				[
61
+				'name'       => 'paginateby',
62
+				'model'      => 'permissions',
63
+				'created_at' => \DB::raw('NOW()'),
64
+				'updated_at' => \DB::raw('NOW()')
65
+				]
66
+			]
67
+		);
68
+	}
69 69
 }
Please login to merge, or discard this patch.
src/Modules/V1/Acl/Database/Seeds/UsersTableSeeder.php 1 patch
Indentation   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -6,125 +6,125 @@
 block discarded – undo
6 6
 
7 7
 class UsersTableSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-    	/**
17
-         * Insert the permissions related to users table.
18
-         */
19
-        \DB::table('permissions')->insert(
20
-        	[
21
-        		/**
22
-        		 * Users model permissions.
23
-        		 */
24
-	        	[
25
-	        	'name'       => 'save',
26
-	        	'model'      => 'users',
27
-	        	'created_at' => \DB::raw('NOW()'),
28
-	        	'updated_at' => \DB::raw('NOW()')
29
-	        	],
30
-	        	[
31
-	        	'name'       => 'delete',
32
-	        	'model'      => 'users',
33
-	        	'created_at' => \DB::raw('NOW()'),
34
-	        	'updated_at' => \DB::raw('NOW()')
35
-	        	],
36
-	        	[
37
-	        	'name'       => 'find',
38
-	        	'model'      => 'users',
39
-	        	'created_at' => \DB::raw('NOW()'),
40
-	        	'updated_at' => \DB::raw('NOW()')
41
-	        	],
42
-	        	[
43
-	        	'name'       => 'list',
44
-	        	'model'      => 'users',
45
-	        	'created_at' => \DB::raw('NOW()'),
46
-	        	'updated_at' => \DB::raw('NOW()')
47
-	        	],
48
-	        	[
49
-	        	'name'       => 'search',
50
-	        	'model'      => 'users',
51
-	        	'created_at' => \DB::raw('NOW()'),
52
-	        	'updated_at' => \DB::raw('NOW()')
53
-	        	],
54
-	        	[
55
-	        	'name'       => 'findby',
56
-	        	'model'      => 'users',
57
-	        	'created_at' => \DB::raw('NOW()'),
58
-	        	'updated_at' => \DB::raw('NOW()')
59
-	        	],
60
-	        	[
61
-	        	'name'       => 'first',
62
-	        	'model'      => 'users',
63
-	        	'created_at' => \DB::raw('NOW()'),
64
-	        	'updated_at' => \DB::raw('NOW()')
65
-	        	],
66
-	        	[
67
-	        	'name'       => 'paginate',
68
-	        	'model'      => 'users',
69
-	        	'created_at' => \DB::raw('NOW()'),
70
-	        	'updated_at' => \DB::raw('NOW()')
71
-	        	],
72
-	        	[
73
-	        	'name'       => 'paginateby',
74
-	        	'model'      => 'users',
75
-	        	'created_at' => \DB::raw('NOW()'),
76
-	        	'updated_at' => \DB::raw('NOW()')
77
-	        	],
78
-	        	[
79
-	        	'name'       => 'assigngroups',
80
-	        	'model'      => 'users',
81
-	        	'created_at' => \DB::raw('NOW()'),
82
-	        	'updated_at' => \DB::raw('NOW()')
83
-	        	],
84
-	        	[
85
-	        	'name'       => 'block',
86
-	        	'model'      => 'users',
87
-	        	'created_at' => \DB::raw('NOW()'),
88
-	        	'updated_at' => \DB::raw('NOW()')
89
-	        	],
90
-	        	[
91
-	        	'name'       => 'unblock',
92
-	        	'model'      => 'users',
93
-	        	'created_at' => \DB::raw('NOW()'),
94
-	        	'updated_at' => \DB::raw('NOW()')
95
-	        	],
96
-	        	[
97
-	        	'name'       => 'group',
98
-	        	'model'      => 'users',
99
-	        	'created_at' => \DB::raw('NOW()'),
100
-	        	'updated_at' => \DB::raw('NOW()')
101
-	        	],
102
-                [
103
-                'name'       => 'deleted',
104
-                'model'      => 'users',
105
-                'created_at' => \DB::raw('NOW()'),
106
-                'updated_at' => \DB::raw('NOW()')
107
-                ],
108
-                [
109
-                'name'       => 'restore',
110
-                'model'      => 'users',
111
-                'created_at' => \DB::raw('NOW()'),
112
-                'updated_at' => \DB::raw('NOW()')
113
-                ]
114
-        	]
115
-        );
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		/**
17
+		 * Insert the permissions related to users table.
18
+		 */
19
+		\DB::table('permissions')->insert(
20
+			[
21
+				/**
22
+				 * Users model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'save',
26
+				'model'      => 'users',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'delete',
32
+				'model'      => 'users',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+				[
37
+				'name'       => 'find',
38
+				'model'      => 'users',
39
+				'created_at' => \DB::raw('NOW()'),
40
+				'updated_at' => \DB::raw('NOW()')
41
+				],
42
+				[
43
+				'name'       => 'list',
44
+				'model'      => 'users',
45
+				'created_at' => \DB::raw('NOW()'),
46
+				'updated_at' => \DB::raw('NOW()')
47
+				],
48
+				[
49
+				'name'       => 'search',
50
+				'model'      => 'users',
51
+				'created_at' => \DB::raw('NOW()'),
52
+				'updated_at' => \DB::raw('NOW()')
53
+				],
54
+				[
55
+				'name'       => 'findby',
56
+				'model'      => 'users',
57
+				'created_at' => \DB::raw('NOW()'),
58
+				'updated_at' => \DB::raw('NOW()')
59
+				],
60
+				[
61
+				'name'       => 'first',
62
+				'model'      => 'users',
63
+				'created_at' => \DB::raw('NOW()'),
64
+				'updated_at' => \DB::raw('NOW()')
65
+				],
66
+				[
67
+				'name'       => 'paginate',
68
+				'model'      => 'users',
69
+				'created_at' => \DB::raw('NOW()'),
70
+				'updated_at' => \DB::raw('NOW()')
71
+				],
72
+				[
73
+				'name'       => 'paginateby',
74
+				'model'      => 'users',
75
+				'created_at' => \DB::raw('NOW()'),
76
+				'updated_at' => \DB::raw('NOW()')
77
+				],
78
+				[
79
+				'name'       => 'assigngroups',
80
+				'model'      => 'users',
81
+				'created_at' => \DB::raw('NOW()'),
82
+				'updated_at' => \DB::raw('NOW()')
83
+				],
84
+				[
85
+				'name'       => 'block',
86
+				'model'      => 'users',
87
+				'created_at' => \DB::raw('NOW()'),
88
+				'updated_at' => \DB::raw('NOW()')
89
+				],
90
+				[
91
+				'name'       => 'unblock',
92
+				'model'      => 'users',
93
+				'created_at' => \DB::raw('NOW()'),
94
+				'updated_at' => \DB::raw('NOW()')
95
+				],
96
+				[
97
+				'name'       => 'group',
98
+				'model'      => 'users',
99
+				'created_at' => \DB::raw('NOW()'),
100
+				'updated_at' => \DB::raw('NOW()')
101
+				],
102
+				[
103
+				'name'       => 'deleted',
104
+				'model'      => 'users',
105
+				'created_at' => \DB::raw('NOW()'),
106
+				'updated_at' => \DB::raw('NOW()')
107
+				],
108
+				[
109
+				'name'       => 'restore',
110
+				'model'      => 'users',
111
+				'created_at' => \DB::raw('NOW()'),
112
+				'updated_at' => \DB::raw('NOW()')
113
+				]
114
+			]
115
+		);
116 116
 
117 117
 		/**
118 118
 		 * Create Default users.
119 119
 		 */
120 120
 		\DB::table('users')->insertGetId(
121
-            [
121
+			[
122 122
 			'name'       => 'Admin',
123 123
 			'email'      => '[email protected]',
124 124
 			'password'   => bcrypt('123456'),
125 125
 			'created_at' => \DB::raw('NOW()'),
126 126
 			'updated_at' => \DB::raw('NOW()')
127 127
 			]
128
-        );
129
-    }
128
+		);
129
+	}
130 130
 }
Please login to merge, or discard this patch.
src/Modules/V1/Acl/Database/Seeds/GroupsTableSeeder.php 1 patch
Indentation   +96 added lines, -96 removed lines patch added patch discarded remove patch
@@ -6,101 +6,101 @@  discard block
 block discarded – undo
6 6
 
7 7
 class GroupsTableSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-    	/**
17
-         * Insert the permissions related to groups table.
18
-         */
19
-        \DB::table('permissions')->insert(
20
-        	[
21
-        		/**
22
-        		 * Groups model permissions.
23
-        		 */
24
-	        	[
25
-	        	'name'       => 'save',
26
-	        	'model'      => 'groups',
27
-	        	'created_at' => \DB::raw('NOW()'),
28
-	        	'updated_at' => \DB::raw('NOW()')
29
-	        	],
30
-	        	[
31
-	        	'name'       => 'delete',
32
-	        	'model'      => 'groups',
33
-	        	'created_at' => \DB::raw('NOW()'),
34
-	        	'updated_at' => \DB::raw('NOW()')
35
-	        	],
36
-	        	[
37
-	        	'name'       => 'find',
38
-	        	'model'      => 'groups',
39
-	        	'created_at' => \DB::raw('NOW()'),
40
-	        	'updated_at' => \DB::raw('NOW()')
41
-	        	],
42
-	        	[
43
-	        	'name'       => 'search',
44
-	        	'model'      => 'groups',
45
-	        	'created_at' => \DB::raw('NOW()'),
46
-	        	'updated_at' => \DB::raw('NOW()')
47
-	        	],
48
-	        	[
49
-	        	'name'       => 'list',
50
-	        	'model'      => 'groups',
51
-	        	'created_at' => \DB::raw('NOW()'),
52
-	        	'updated_at' => \DB::raw('NOW()')
53
-	        	],
54
-	        	[
55
-	        	'name'       => 'findby',
56
-	        	'model'      => 'groups',
57
-	        	'created_at' => \DB::raw('NOW()'),
58
-	        	'updated_at' => \DB::raw('NOW()')
59
-	        	],
60
-	        	[
61
-	        	'name'       => 'first',
62
-	        	'model'      => 'groups',
63
-	        	'created_at' => \DB::raw('NOW()'),
64
-	        	'updated_at' => \DB::raw('NOW()')
65
-	        	],
66
-	        	[
67
-	        	'name'       => 'paginate',
68
-	        	'model'      => 'groups',
69
-	        	'created_at' => \DB::raw('NOW()'),
70
-	        	'updated_at' => \DB::raw('NOW()')
71
-	        	],
72
-	        	[
73
-	        	'name'       => 'paginateby',
74
-	        	'model'      => 'groups',
75
-	        	'created_at' => \DB::raw('NOW()'),
76
-	        	'updated_at' => \DB::raw('NOW()')
77
-	        	],
78
-	        	[
79
-	        	'name'       => 'assignpermissions',
80
-	        	'model'      => 'groups',
81
-	        	'created_at' => \DB::raw('NOW()'),
82
-	        	'updated_at' => \DB::raw('NOW()')
83
-	        	],
84
-	        	[
85
-	        	'name'       => 'users',
86
-	        	'model'      => 'groups',
87
-	        	'created_at' => \DB::raw('NOW()'),
88
-	        	'updated_at' => \DB::raw('NOW()')
89
-	        	],
90
-                [
91
-                'name'       => 'deleted',
92
-                'model'      => 'groups',
93
-                'created_at' => \DB::raw('NOW()'),
94
-                'updated_at' => \DB::raw('NOW()')
95
-                ],
96
-                [
97
-                'name'       => 'restore',
98
-                'model'      => 'groups',
99
-                'created_at' => \DB::raw('NOW()'),
100
-                'updated_at' => \DB::raw('NOW()')
101
-                ]
102
-        	]
103
-        );
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		/**
17
+		 * Insert the permissions related to groups table.
18
+		 */
19
+		\DB::table('permissions')->insert(
20
+			[
21
+				/**
22
+				 * Groups model permissions.
23
+				 */
24
+				[
25
+				'name'       => 'save',
26
+				'model'      => 'groups',
27
+				'created_at' => \DB::raw('NOW()'),
28
+				'updated_at' => \DB::raw('NOW()')
29
+				],
30
+				[
31
+				'name'       => 'delete',
32
+				'model'      => 'groups',
33
+				'created_at' => \DB::raw('NOW()'),
34
+				'updated_at' => \DB::raw('NOW()')
35
+				],
36
+				[
37
+				'name'       => 'find',
38
+				'model'      => 'groups',
39
+				'created_at' => \DB::raw('NOW()'),
40
+				'updated_at' => \DB::raw('NOW()')
41
+				],
42
+				[
43
+				'name'       => 'search',
44
+				'model'      => 'groups',
45
+				'created_at' => \DB::raw('NOW()'),
46
+				'updated_at' => \DB::raw('NOW()')
47
+				],
48
+				[
49
+				'name'       => 'list',
50
+				'model'      => 'groups',
51
+				'created_at' => \DB::raw('NOW()'),
52
+				'updated_at' => \DB::raw('NOW()')
53
+				],
54
+				[
55
+				'name'       => 'findby',
56
+				'model'      => 'groups',
57
+				'created_at' => \DB::raw('NOW()'),
58
+				'updated_at' => \DB::raw('NOW()')
59
+				],
60
+				[
61
+				'name'       => 'first',
62
+				'model'      => 'groups',
63
+				'created_at' => \DB::raw('NOW()'),
64
+				'updated_at' => \DB::raw('NOW()')
65
+				],
66
+				[
67
+				'name'       => 'paginate',
68
+				'model'      => 'groups',
69
+				'created_at' => \DB::raw('NOW()'),
70
+				'updated_at' => \DB::raw('NOW()')
71
+				],
72
+				[
73
+				'name'       => 'paginateby',
74
+				'model'      => 'groups',
75
+				'created_at' => \DB::raw('NOW()'),
76
+				'updated_at' => \DB::raw('NOW()')
77
+				],
78
+				[
79
+				'name'       => 'assignpermissions',
80
+				'model'      => 'groups',
81
+				'created_at' => \DB::raw('NOW()'),
82
+				'updated_at' => \DB::raw('NOW()')
83
+				],
84
+				[
85
+				'name'       => 'users',
86
+				'model'      => 'groups',
87
+				'created_at' => \DB::raw('NOW()'),
88
+				'updated_at' => \DB::raw('NOW()')
89
+				],
90
+				[
91
+				'name'       => 'deleted',
92
+				'model'      => 'groups',
93
+				'created_at' => \DB::raw('NOW()'),
94
+				'updated_at' => \DB::raw('NOW()')
95
+				],
96
+				[
97
+				'name'       => 'restore',
98
+				'model'      => 'groups',
99
+				'created_at' => \DB::raw('NOW()'),
100
+				'updated_at' => \DB::raw('NOW()')
101
+				]
102
+			]
103
+		);
104 104
 
105 105
 		/**
106 106
 		 * Create Default groups.
@@ -112,5 +112,5 @@  discard block
 block discarded – undo
112 112
 			'updated_at' => \DB::raw('NOW()')
113 113
 			]
114 114
 		);
115
-    }
115
+	}
116 116
 }
Please login to merge, or discard this patch.
src/Modules/V1/Acl/Database/Seeds/AssignRelationsSeeder.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@  discard block
 block discarded – undo
6 6
 
7 7
 class AssignRelationsSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-    	$adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id;
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		$adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id;
17 17
 		$adminUserId  = \DB::table('users')->where('email', '[email protected]')->select('id')->first()->id;
18 18
 
19 19
 		/**
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 			'created_at' => \DB::raw('NOW()'),
27 27
 			'updated_at' => \DB::raw('NOW()')
28 28
 			]
29
-        );
29
+		);
30 30
 
31
-        /**
31
+		/**
32 32
 		 * Assign the permissions to the admin group.
33 33
 		 */
34
-        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups'])->each(function ($permission) use ($adminGroupId) {
35
-        	\DB::table('groups_permissions')->insert(
34
+		\DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups'])->each(function ($permission) use ($adminGroupId) {
35
+			\DB::table('groups_permissions')->insert(
36 36
 				[
37 37
 				'permission_id' => $permission->id,
38 38
 				'group_id'      => $adminGroupId,
@@ -40,6 +40,6 @@  discard block
 block discarded – undo
40 40
 				'updated_at'    => \DB::raw('NOW()')
41 41
 				]
42 42
 			);
43
-        });
44
-    }
43
+		});
44
+	}
45 45
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     public function run()
15 15
     {
16 16
     	$adminGroupId = \DB::table('groups')->where('name', 'admin')->select('id')->first()->id;
17
-		$adminUserId  = \DB::table('users')->where('email', '[email protected]')->select('id')->first()->id;
17
+		$adminUserId = \DB::table('users')->where('email', '[email protected]')->select('id')->first()->id;
18 18
 
19 19
 		/**
20 20
 		 * Assign users to groups.
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         /**
32 32
 		 * Assign the permissions to the admin group.
33 33
 		 */
34
-        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups'])->each(function ($permission) use ($adminGroupId) {
34
+        \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups'])->each(function($permission) use ($adminGroupId) {
35 35
         	\DB::table('groups_permissions')->insert(
36 36
 				[
37 37
 				'permission_id' => $permission->id,
Please login to merge, or discard this patch.
src/Modules/V1/Reporting/Database/Seeds/ReportingDatabaseSeeder.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 
7 7
 class ReportingDatabaseSeeder extends Seeder
8 8
 {
9
-    /**
10
-     * Run the database seeds.
11
-     *
12
-     * @return void
13
-     */
14
-    public function run()
15
-    {
16
-        $this->call(ClearDataSeeder::class);
17
-    	$this->call(ReportsTableSeeder::class);
18
-        $this->call(AssignRelationsSeeder::class);
19
-    }
9
+	/**
10
+	 * Run the database seeds.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function run()
15
+	{
16
+		$this->call(ClearDataSeeder::class);
17
+		$this->call(ReportsTableSeeder::class);
18
+		$this->call(AssignRelationsSeeder::class);
19
+	}
20 20
 }
Please login to merge, or discard this patch.