Completed
Push — master ( d62dde...2f9ece )
by Sherif
04:27
created
src/Modules/Core/Database/Migrations/2016_01_24_123631_initialize.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Illuminate\Database\Schema\Blueprint;
4 3
 use Illuminate\Database\Migrations\Migration;
5 4
 
6 5
 class Initialize extends Migration
Please login to merge, or discard this patch.
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -12,71 +12,71 @@
 block discarded – undo
12 12
 	 */
13 13
 	public function up()
14 14
 	{
15
-        /**
16
-         * Delete previous permissions.
17
-         */
15
+		/**
16
+		 * Delete previous permissions.
17
+		 */
18 18
 		DB::table('permissions')->whereIn('model', ['settings'])->delete();
19 19
 
20 20
 		/**
21
-         * Insert the permissions related to this module.
22
-         */
23
-        DB::table('permissions')->insert(
24
-        	[
25
-        		/**
26
-        		 * Users model permissions.
27
-        		 */
28
-	        	[
29
-	        	'name'       => 'save',
30
-	        	'model'      => 'settings',
31
-	        	'created_at' => \DB::raw('NOW()'),
32
-	        	'updated_at' => \DB::raw('NOW()')
33
-	        	],
34
-	        	[
35
-	        	'name'       => 'find',
36
-	        	'model'      => 'settings',
37
-	        	'created_at' => \DB::raw('NOW()'),
38
-	        	'updated_at' => \DB::raw('NOW()')
39
-	        	],
40
-	        	[
41
-	        	'name'       => 'search',
42
-	        	'model'      => 'settings',
43
-	        	'created_at' => \DB::raw('NOW()'),
44
-	        	'updated_at' => \DB::raw('NOW()')
45
-	        	],
46
-	        	[
47
-	        	'name'       => 'list',
48
-	        	'model'      => 'settings',
49
-	        	'created_at' => \DB::raw('NOW()'),
50
-	        	'updated_at' => \DB::raw('NOW()')
51
-	        	],
52
-	        	[
53
-	        	'name'       => 'findby',
54
-	        	'model'      => 'settings',
55
-	        	'created_at' => \DB::raw('NOW()'),
56
-	        	'updated_at' => \DB::raw('NOW()')
57
-	        	],
58
-	        	[
59
-	        	'name'       => 'first',
60
-	        	'model'      => 'settings',
61
-	        	'created_at' => \DB::raw('NOW()'),
62
-	        	'updated_at' => \DB::raw('NOW()')
63
-	        	],
64
-	        	[
65
-	        	'name'       => 'paginate',
66
-	        	'model'      => 'settings',
67
-	        	'created_at' => \DB::raw('NOW()'),
68
-	        	'updated_at' => \DB::raw('NOW()')
69
-	        	],
70
-	        	[
71
-	        	'name'       => 'paginateby',
72
-	        	'model'      => 'settings',
73
-	        	'created_at' => \DB::raw('NOW()'),
74
-	        	'updated_at' => \DB::raw('NOW()')
75
-	        	]
76
-        	]
77
-        );
21
+		 * Insert the permissions related to this module.
22
+		 */
23
+		DB::table('permissions')->insert(
24
+			[
25
+				/**
26
+				 * Users model permissions.
27
+				 */
28
+				[
29
+				'name'       => 'save',
30
+				'model'      => 'settings',
31
+				'created_at' => \DB::raw('NOW()'),
32
+				'updated_at' => \DB::raw('NOW()')
33
+				],
34
+				[
35
+				'name'       => 'find',
36
+				'model'      => 'settings',
37
+				'created_at' => \DB::raw('NOW()'),
38
+				'updated_at' => \DB::raw('NOW()')
39
+				],
40
+				[
41
+				'name'       => 'search',
42
+				'model'      => 'settings',
43
+				'created_at' => \DB::raw('NOW()'),
44
+				'updated_at' => \DB::raw('NOW()')
45
+				],
46
+				[
47
+				'name'       => 'list',
48
+				'model'      => 'settings',
49
+				'created_at' => \DB::raw('NOW()'),
50
+				'updated_at' => \DB::raw('NOW()')
51
+				],
52
+				[
53
+				'name'       => 'findby',
54
+				'model'      => 'settings',
55
+				'created_at' => \DB::raw('NOW()'),
56
+				'updated_at' => \DB::raw('NOW()')
57
+				],
58
+				[
59
+				'name'       => 'first',
60
+				'model'      => 'settings',
61
+				'created_at' => \DB::raw('NOW()'),
62
+				'updated_at' => \DB::raw('NOW()')
63
+				],
64
+				[
65
+				'name'       => 'paginate',
66
+				'model'      => 'settings',
67
+				'created_at' => \DB::raw('NOW()'),
68
+				'updated_at' => \DB::raw('NOW()')
69
+				],
70
+				[
71
+				'name'       => 'paginateby',
72
+				'model'      => 'settings',
73
+				'created_at' => \DB::raw('NOW()'),
74
+				'updated_at' => \DB::raw('NOW()')
75
+				]
76
+			]
77
+		);
78 78
 
79
-        /**
79
+		/**
80 80
 		 * Assign the permissions to the admin group.
81 81
 		 */
82 82
 		$permissionIds = DB::table('permissions')->whereIn('model', ['settings'])->select('id')->lists('id');
Please login to merge, or discard this patch.
src/Modules/Logging/Database/Migrations/2016_01_24_123631_initialize.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Illuminate\Database\Schema\Blueprint;
4 3
 use Illuminate\Database\Migrations\Migration;
5 4
 
6 5
 class Initialize extends Migration
Please login to merge, or discard this patch.
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -12,65 +12,65 @@
 block discarded – undo
12 12
 	 */
13 13
 	public function up()
14 14
 	{
15
-        /**
16
-         * Delete previous permissions.
17
-         */
15
+		/**
16
+		 * Delete previous permissions.
17
+		 */
18 18
 		DB::table('permissions')->whereIn('model', ['logs'])->delete();
19 19
 
20 20
 		 /**
21
-         * Insert the permissions related to this module.
22
-         */
23
-        DB::table('permissions')->insert(
24
-        	[
25
-        		/**
26
-        		 * Logs model permissions.
27
-        		 */
28
-	        	[
29
-	        	'name'       => 'find',
30
-	        	'model'      => 'logs',
31
-	        	'created_at' => \DB::raw('NOW()'),
32
-	        	'updated_at' => \DB::raw('NOW()')
33
-	        	],
34
-	        	[
35
-	        	'name'       => 'search',
36
-	        	'model'      => 'logs',
37
-	        	'created_at' => \DB::raw('NOW()'),
38
-	        	'updated_at' => \DB::raw('NOW()')
39
-	        	],
40
-	        	[
41
-	        	'name'       => 'list',
42
-	        	'model'      => 'logs',
43
-	        	'created_at' => \DB::raw('NOW()'),
44
-	        	'updated_at' => \DB::raw('NOW()')
45
-	        	],
46
-	        	[
47
-	        	'name'       => 'findby',
48
-	        	'model'      => 'logs',
49
-	        	'created_at' => \DB::raw('NOW()'),
50
-	        	'updated_at' => \DB::raw('NOW()')
51
-	        	],
52
-	        	[
53
-	        	'name'       => 'first',
54
-	        	'model'      => 'logs',
55
-	        	'created_at' => \DB::raw('NOW()'),
56
-	        	'updated_at' => \DB::raw('NOW()')
57
-	        	],
58
-	        	[
59
-	        	'name'       => 'paginate',
60
-	        	'model'      => 'logs',
61
-	        	'created_at' => \DB::raw('NOW()'),
62
-	        	'updated_at' => \DB::raw('NOW()')
63
-	        	],
64
-	        	[
65
-	        	'name'       => 'paginateby',
66
-	        	'model'      => 'logs',
67
-	        	'created_at' => \DB::raw('NOW()'),
68
-	        	'updated_at' => \DB::raw('NOW()')
69
-	        	],
70
-        	]
71
-        );
21
+		  * Insert the permissions related to this module.
22
+		  */
23
+		DB::table('permissions')->insert(
24
+			[
25
+				/**
26
+				 * Logs model permissions.
27
+				 */
28
+				[
29
+				'name'       => 'find',
30
+				'model'      => 'logs',
31
+				'created_at' => \DB::raw('NOW()'),
32
+				'updated_at' => \DB::raw('NOW()')
33
+				],
34
+				[
35
+				'name'       => 'search',
36
+				'model'      => 'logs',
37
+				'created_at' => \DB::raw('NOW()'),
38
+				'updated_at' => \DB::raw('NOW()')
39
+				],
40
+				[
41
+				'name'       => 'list',
42
+				'model'      => 'logs',
43
+				'created_at' => \DB::raw('NOW()'),
44
+				'updated_at' => \DB::raw('NOW()')
45
+				],
46
+				[
47
+				'name'       => 'findby',
48
+				'model'      => 'logs',
49
+				'created_at' => \DB::raw('NOW()'),
50
+				'updated_at' => \DB::raw('NOW()')
51
+				],
52
+				[
53
+				'name'       => 'first',
54
+				'model'      => 'logs',
55
+				'created_at' => \DB::raw('NOW()'),
56
+				'updated_at' => \DB::raw('NOW()')
57
+				],
58
+				[
59
+				'name'       => 'paginate',
60
+				'model'      => 'logs',
61
+				'created_at' => \DB::raw('NOW()'),
62
+				'updated_at' => \DB::raw('NOW()')
63
+				],
64
+				[
65
+				'name'       => 'paginateby',
66
+				'model'      => 'logs',
67
+				'created_at' => \DB::raw('NOW()'),
68
+				'updated_at' => \DB::raw('NOW()')
69
+				],
70
+			]
71
+		);
72 72
 
73
-        /**
73
+		/**
74 74
 		 * Assign the permissions to the admin group.
75 75
 		 */
76 76
 		$permissionIds = DB::table('permissions')->whereIn('model', ['logs'])->select('id')->lists('id');
Please login to merge, or discard this patch.
Modules/Notifications/Database/Migrations/2016_01_24_123631_initialize.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Illuminate\Database\Schema\Blueprint;
4 3
 use Illuminate\Database\Migrations\Migration;
5 4
 
6 5
 class Initialize extends Migration
Please login to merge, or discard this patch.
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -12,77 +12,77 @@
 block discarded – undo
12 12
 	 */
13 13
 	public function up()
14 14
 	{
15
-        /**
16
-         * Delete previous permissions.
17
-         */
15
+		/**
16
+		 * Delete previous permissions.
17
+		 */
18 18
 		DB::table('permissions')->whereIn('model', ['notifications'])->delete();
19 19
 
20 20
 		/**
21
-         * Insert the permissions related to this module.
22
-         */
23
-        DB::table('permissions')->insert(
24
-        	[
25
-        		/**
26
-        		 * Logs model permissions.
27
-        		 */
28
-	        	[
29
-	        	'name'       => 'find',
30
-	        	'model'      => 'notifications',
31
-	        	'created_at' => \DB::raw('NOW()'),
32
-	        	'updated_at' => \DB::raw('NOW()')
33
-	        	],
34
-	        	[
35
-	        	'name'       => 'search',
36
-	        	'model'      => 'notifications',
37
-	        	'created_at' => \DB::raw('NOW()'),
38
-	        	'updated_at' => \DB::raw('NOW()')
39
-	        	],
40
-	        	[
41
-	        	'name'       => 'list',
42
-	        	'model'      => 'notifications',
43
-	        	'created_at' => \DB::raw('NOW()'),
44
-	        	'updated_at' => \DB::raw('NOW()')
45
-	        	],
46
-	        	[
47
-	        	'name'       => 'findby',
48
-	        	'model'      => 'notifications',
49
-	        	'created_at' => \DB::raw('NOW()'),
50
-	        	'updated_at' => \DB::raw('NOW()')
51
-	        	],
52
-	        	[
53
-	        	'name'       => 'first',
54
-	        	'model'      => 'notifications',
55
-	        	'created_at' => \DB::raw('NOW()'),
56
-	        	'updated_at' => \DB::raw('NOW()')
57
-	        	],
58
-	        	[
59
-	        	'name'       => 'paginate',
60
-	        	'model'      => 'notifications',
61
-	        	'created_at' => \DB::raw('NOW()'),
62
-	        	'updated_at' => \DB::raw('NOW()')
63
-	        	],
64
-	        	[
65
-	        	'name'       => 'paginateby',
66
-	        	'model'      => 'notifications',
67
-	        	'created_at' => \DB::raw('NOW()'),
68
-	        	'updated_at' => \DB::raw('NOW()')
69
-	        	],
70
-	        	[
71
-	        	'name'       => 'notified',
72
-	        	'model'      => 'notifications',
73
-	        	'created_at' => \DB::raw('NOW()'),
74
-	        	'updated_at' => \DB::raw('NOW()')
75
-	        	],
76
-	        	[
77
-	        	'name'       => 'notifyall',
78
-	        	'model'      => 'notifications',
79
-	        	'created_at' => \DB::raw('NOW()'),
80
-	        	'updated_at' => \DB::raw('NOW()')
81
-	        	],
82
-        	]
83
-        );
21
+		 * Insert the permissions related to this module.
22
+		 */
23
+		DB::table('permissions')->insert(
24
+			[
25
+				/**
26
+				 * Logs model permissions.
27
+				 */
28
+				[
29
+				'name'       => 'find',
30
+				'model'      => 'notifications',
31
+				'created_at' => \DB::raw('NOW()'),
32
+				'updated_at' => \DB::raw('NOW()')
33
+				],
34
+				[
35
+				'name'       => 'search',
36
+				'model'      => 'notifications',
37
+				'created_at' => \DB::raw('NOW()'),
38
+				'updated_at' => \DB::raw('NOW()')
39
+				],
40
+				[
41
+				'name'       => 'list',
42
+				'model'      => 'notifications',
43
+				'created_at' => \DB::raw('NOW()'),
44
+				'updated_at' => \DB::raw('NOW()')
45
+				],
46
+				[
47
+				'name'       => 'findby',
48
+				'model'      => 'notifications',
49
+				'created_at' => \DB::raw('NOW()'),
50
+				'updated_at' => \DB::raw('NOW()')
51
+				],
52
+				[
53
+				'name'       => 'first',
54
+				'model'      => 'notifications',
55
+				'created_at' => \DB::raw('NOW()'),
56
+				'updated_at' => \DB::raw('NOW()')
57
+				],
58
+				[
59
+				'name'       => 'paginate',
60
+				'model'      => 'notifications',
61
+				'created_at' => \DB::raw('NOW()'),
62
+				'updated_at' => \DB::raw('NOW()')
63
+				],
64
+				[
65
+				'name'       => 'paginateby',
66
+				'model'      => 'notifications',
67
+				'created_at' => \DB::raw('NOW()'),
68
+				'updated_at' => \DB::raw('NOW()')
69
+				],
70
+				[
71
+				'name'       => 'notified',
72
+				'model'      => 'notifications',
73
+				'created_at' => \DB::raw('NOW()'),
74
+				'updated_at' => \DB::raw('NOW()')
75
+				],
76
+				[
77
+				'name'       => 'notifyall',
78
+				'model'      => 'notifications',
79
+				'created_at' => \DB::raw('NOW()'),
80
+				'updated_at' => \DB::raw('NOW()')
81
+				],
82
+			]
83
+		);
84 84
 
85
-        /**
85
+		/**
86 86
 		 * Assign the permissions to the admin group.
87 87
 		 */
88 88
 		$permissionIds = DB::table('permissions')->whereIn('model', ['notifications'])->select('id')->lists('id');
Please login to merge, or discard this patch.
src/Modules/Reports/Database/Migrations/2016_01_24_123631_initialize.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Illuminate\Database\Schema\Blueprint;
4 3
 use Illuminate\Database\Migrations\Migration;
5 4
 
6 5
 class Initialize extends Migration
Please login to merge, or discard this patch.
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -12,71 +12,71 @@
 block discarded – undo
12 12
 	 */
13 13
 	public function up()
14 14
 	{
15
-        /**
16
-         * Delete previous permissions.
17
-         */
15
+		/**
16
+		 * Delete previous permissions.
17
+		 */
18 18
 		DB::table('permissions')->whereIn('model', ['reports'])->delete();
19 19
 
20 20
 		/**
21
-         * Insert the permissions related to this module.
22
-         */
23
-        DB::table('permissions')->insert(
24
-        	[
25
-        		/**
26
-        		 * Reports model permissions.
27
-        		 */
28
-	        	[
29
-	        	'name'       => 'find',
30
-	        	'model'      => 'reports',
31
-	        	'created_at' => \DB::raw('NOW()'),
32
-	        	'updated_at' => \DB::raw('NOW()')
33
-	        	],
34
-	        	[
35
-	        	'name'       => 'search',
36
-	        	'model'      => 'reports',
37
-	        	'created_at' => \DB::raw('NOW()'),
38
-	        	'updated_at' => \DB::raw('NOW()')
39
-	        	],
40
-	        	[
41
-	        	'name'       => 'list',
42
-	        	'model'      => 'reports',
43
-	        	'created_at' => \DB::raw('NOW()'),
44
-	        	'updated_at' => \DB::raw('NOW()')
45
-	        	],
46
-	        	[
47
-	        	'name'       => 'findby',
48
-	        	'model'      => 'reports',
49
-	        	'created_at' => \DB::raw('NOW()'),
50
-	        	'updated_at' => \DB::raw('NOW()')
51
-	        	],
52
-	        	[
53
-	        	'name'       => 'first',
54
-	        	'model'      => 'reports',
55
-	        	'created_at' => \DB::raw('NOW()'),
56
-	        	'updated_at' => \DB::raw('NOW()')
57
-	        	],
58
-	        	[
59
-	        	'name'       => 'paginate',
60
-	        	'model'      => 'reports',
61
-	        	'created_at' => \DB::raw('NOW()'),
62
-	        	'updated_at' => \DB::raw('NOW()')
63
-	        	],
64
-	        	[
65
-	        	'name'       => 'paginateby',
66
-	        	'model'      => 'reports',
67
-	        	'created_at' => \DB::raw('NOW()'),
68
-	        	'updated_at' => \DB::raw('NOW()')
69
-	        	],
70
-	        	[
71
-	        	'name'       => 'admin_count',
72
-	        	'model'      => 'reports',
73
-	        	'created_at' => \DB::raw('NOW()'),
74
-	        	'updated_at' => \DB::raw('NOW()')
75
-	        	]
76
-        	]
77
-        );
21
+		 * Insert the permissions related to this module.
22
+		 */
23
+		DB::table('permissions')->insert(
24
+			[
25
+				/**
26
+				 * Reports model permissions.
27
+				 */
28
+				[
29
+				'name'       => 'find',
30
+				'model'      => 'reports',
31
+				'created_at' => \DB::raw('NOW()'),
32
+				'updated_at' => \DB::raw('NOW()')
33
+				],
34
+				[
35
+				'name'       => 'search',
36
+				'model'      => 'reports',
37
+				'created_at' => \DB::raw('NOW()'),
38
+				'updated_at' => \DB::raw('NOW()')
39
+				],
40
+				[
41
+				'name'       => 'list',
42
+				'model'      => 'reports',
43
+				'created_at' => \DB::raw('NOW()'),
44
+				'updated_at' => \DB::raw('NOW()')
45
+				],
46
+				[
47
+				'name'       => 'findby',
48
+				'model'      => 'reports',
49
+				'created_at' => \DB::raw('NOW()'),
50
+				'updated_at' => \DB::raw('NOW()')
51
+				],
52
+				[
53
+				'name'       => 'first',
54
+				'model'      => 'reports',
55
+				'created_at' => \DB::raw('NOW()'),
56
+				'updated_at' => \DB::raw('NOW()')
57
+				],
58
+				[
59
+				'name'       => 'paginate',
60
+				'model'      => 'reports',
61
+				'created_at' => \DB::raw('NOW()'),
62
+				'updated_at' => \DB::raw('NOW()')
63
+				],
64
+				[
65
+				'name'       => 'paginateby',
66
+				'model'      => 'reports',
67
+				'created_at' => \DB::raw('NOW()'),
68
+				'updated_at' => \DB::raw('NOW()')
69
+				],
70
+				[
71
+				'name'       => 'admin_count',
72
+				'model'      => 'reports',
73
+				'created_at' => \DB::raw('NOW()'),
74
+				'updated_at' => \DB::raw('NOW()')
75
+				]
76
+			]
77
+		);
78 78
 
79
-        /**
79
+		/**
80 80
 		 * Assign the permissions to the admin group.
81 81
 		 */
82 82
 		$permissionIds = DB::table('permissions')->whereIn('model', ['reports'])->select('id')->lists('id');
Please login to merge, or discard this patch.
src/Modules/Acl/Database/Migrations/2016_01_05_130507_initialize.php 1 patch
Indentation   +188 added lines, -188 removed lines patch added patch discarded remove patch
@@ -12,191 +12,191 @@  discard block
 block discarded – undo
12 12
 	 */
13 13
 	public function up()
14 14
 	{
15
-        /**
16
-         * Delete previous permissions.
17
-         */
15
+		/**
16
+		 * Delete previous permissions.
17
+		 */
18 18
 		DB::table('permissions')->whereIn('model', ['users', 'permissions', 'groups'])->delete();
19 19
 
20 20
 		/**
21
-         * Insert the permissions related to this module.
22
-         */
23
-        DB::table('permissions')->insert(
24
-        	[
25
-        		/**
26
-        		 * Users model permissions.
27
-        		 */
28
-	        	[
29
-	        	'name'       => 'save',
30
-	        	'model'      => 'users',
31
-	        	'created_at' => \DB::raw('NOW()'),
32
-	        	'updated_at' => \DB::raw('NOW()')
33
-	        	],
34
-	        	[
35
-	        	'name'       => 'delete',
36
-	        	'model'      => 'users',
37
-	        	'created_at' => \DB::raw('NOW()'),
38
-	        	'updated_at' => \DB::raw('NOW()')
39
-	        	],
40
-	        	[
41
-	        	'name'       => 'find',
42
-	        	'model'      => 'users',
43
-	        	'created_at' => \DB::raw('NOW()'),
44
-	        	'updated_at' => \DB::raw('NOW()')
45
-	        	],
46
-	        	[
47
-	        	'name'       => 'list',
48
-	        	'model'      => 'users',
49
-	        	'created_at' => \DB::raw('NOW()'),
50
-	        	'updated_at' => \DB::raw('NOW()')
51
-	        	],
52
-	        	[
53
-	        	'name'       => 'search',
54
-	        	'model'      => 'users',
55
-	        	'created_at' => \DB::raw('NOW()'),
56
-	        	'updated_at' => \DB::raw('NOW()')
57
-	        	],
58
-	        	[
59
-	        	'name'       => 'findby',
60
-	        	'model'      => 'users',
61
-	        	'created_at' => \DB::raw('NOW()'),
62
-	        	'updated_at' => \DB::raw('NOW()')
63
-	        	],
64
-	        	[
65
-	        	'name'       => 'first',
66
-	        	'model'      => 'users',
67
-	        	'created_at' => \DB::raw('NOW()'),
68
-	        	'updated_at' => \DB::raw('NOW()')
69
-	        	],
70
-	        	[
71
-	        	'name'       => 'paginate',
72
-	        	'model'      => 'users',
73
-	        	'created_at' => \DB::raw('NOW()'),
74
-	        	'updated_at' => \DB::raw('NOW()')
75
-	        	],
76
-	        	[
77
-	        	'name'       => 'paginateby',
78
-	        	'model'      => 'users',
79
-	        	'created_at' => \DB::raw('NOW()'),
80
-	        	'updated_at' => \DB::raw('NOW()')
81
-	        	],
82
-	        	[
83
-	        	'name'       => 'assigngroup',
84
-	        	'model'      => 'users',
85
-	        	'created_at' => \DB::raw('NOW()'),
86
-	        	'updated_at' => \DB::raw('NOW()')
87
-	        	],
21
+		 * Insert the permissions related to this module.
22
+		 */
23
+		DB::table('permissions')->insert(
24
+			[
25
+				/**
26
+				 * Users model permissions.
27
+				 */
28
+				[
29
+				'name'       => 'save',
30
+				'model'      => 'users',
31
+				'created_at' => \DB::raw('NOW()'),
32
+				'updated_at' => \DB::raw('NOW()')
33
+				],
34
+				[
35
+				'name'       => 'delete',
36
+				'model'      => 'users',
37
+				'created_at' => \DB::raw('NOW()'),
38
+				'updated_at' => \DB::raw('NOW()')
39
+				],
40
+				[
41
+				'name'       => 'find',
42
+				'model'      => 'users',
43
+				'created_at' => \DB::raw('NOW()'),
44
+				'updated_at' => \DB::raw('NOW()')
45
+				],
46
+				[
47
+				'name'       => 'list',
48
+				'model'      => 'users',
49
+				'created_at' => \DB::raw('NOW()'),
50
+				'updated_at' => \DB::raw('NOW()')
51
+				],
52
+				[
53
+				'name'       => 'search',
54
+				'model'      => 'users',
55
+				'created_at' => \DB::raw('NOW()'),
56
+				'updated_at' => \DB::raw('NOW()')
57
+				],
58
+				[
59
+				'name'       => 'findby',
60
+				'model'      => 'users',
61
+				'created_at' => \DB::raw('NOW()'),
62
+				'updated_at' => \DB::raw('NOW()')
63
+				],
64
+				[
65
+				'name'       => 'first',
66
+				'model'      => 'users',
67
+				'created_at' => \DB::raw('NOW()'),
68
+				'updated_at' => \DB::raw('NOW()')
69
+				],
70
+				[
71
+				'name'       => 'paginate',
72
+				'model'      => 'users',
73
+				'created_at' => \DB::raw('NOW()'),
74
+				'updated_at' => \DB::raw('NOW()')
75
+				],
76
+				[
77
+				'name'       => 'paginateby',
78
+				'model'      => 'users',
79
+				'created_at' => \DB::raw('NOW()'),
80
+				'updated_at' => \DB::raw('NOW()')
81
+				],
82
+				[
83
+				'name'       => 'assigngroup',
84
+				'model'      => 'users',
85
+				'created_at' => \DB::raw('NOW()'),
86
+				'updated_at' => \DB::raw('NOW()')
87
+				],
88 88
 
89
-	        	/**
90
-        		 * Permissions model permissions.
91
-        		 */
92
-        		[
93
-	        	'name'       => 'find',
94
-	        	'model'      => 'permissions',
95
-	        	'created_at' => \DB::raw('NOW()'),
96
-	        	'updated_at' => \DB::raw('NOW()')
97
-	        	],
98
-	        	[
99
-	        	'name'       => 'search',
100
-	        	'model'      => 'permissions',
101
-	        	'created_at' => \DB::raw('NOW()'),
102
-	        	'updated_at' => \DB::raw('NOW()')
103
-	        	],
104
-	        	[
105
-	        	'name'       => 'list',
106
-	        	'model'      => 'permissions',
107
-	        	'created_at' => \DB::raw('NOW()'),
108
-	        	'updated_at' => \DB::raw('NOW()')
109
-	        	],
110
-	        	[
111
-	        	'name'       => 'findby',
112
-	        	'model'      => 'permissions',
113
-	        	'created_at' => \DB::raw('NOW()'),
114
-	        	'updated_at' => \DB::raw('NOW()')
115
-	        	],
116
-	        	[
117
-	        	'name'       => 'first',
118
-	        	'model'      => 'permissions',
119
-	        	'created_at' => \DB::raw('NOW()'),
120
-	        	'updated_at' => \DB::raw('NOW()')
121
-	        	],
122
-	        	[
123
-	        	'name'       => 'paginate',
124
-	        	'model'      => 'permissions',
125
-	        	'created_at' => \DB::raw('NOW()'),
126
-	        	'updated_at' => \DB::raw('NOW()')
127
-	        	],
128
-	        	[
129
-	        	'name'       => 'paginateby',
130
-	        	'model'      => 'permissions',
131
-	        	'created_at' => \DB::raw('NOW()'),
132
-	        	'updated_at' => \DB::raw('NOW()')
133
-	        	],
89
+				/**
90
+				 * Permissions model permissions.
91
+				 */
92
+				[
93
+				'name'       => 'find',
94
+				'model'      => 'permissions',
95
+				'created_at' => \DB::raw('NOW()'),
96
+				'updated_at' => \DB::raw('NOW()')
97
+				],
98
+				[
99
+				'name'       => 'search',
100
+				'model'      => 'permissions',
101
+				'created_at' => \DB::raw('NOW()'),
102
+				'updated_at' => \DB::raw('NOW()')
103
+				],
104
+				[
105
+				'name'       => 'list',
106
+				'model'      => 'permissions',
107
+				'created_at' => \DB::raw('NOW()'),
108
+				'updated_at' => \DB::raw('NOW()')
109
+				],
110
+				[
111
+				'name'       => 'findby',
112
+				'model'      => 'permissions',
113
+				'created_at' => \DB::raw('NOW()'),
114
+				'updated_at' => \DB::raw('NOW()')
115
+				],
116
+				[
117
+				'name'       => 'first',
118
+				'model'      => 'permissions',
119
+				'created_at' => \DB::raw('NOW()'),
120
+				'updated_at' => \DB::raw('NOW()')
121
+				],
122
+				[
123
+				'name'       => 'paginate',
124
+				'model'      => 'permissions',
125
+				'created_at' => \DB::raw('NOW()'),
126
+				'updated_at' => \DB::raw('NOW()')
127
+				],
128
+				[
129
+				'name'       => 'paginateby',
130
+				'model'      => 'permissions',
131
+				'created_at' => \DB::raw('NOW()'),
132
+				'updated_at' => \DB::raw('NOW()')
133
+				],
134 134
 
135
-	        	/**
136
-        		 * Groups model permissions.
137
-        		 */
138
-	        	[
139
-	        	'name'       => 'save',
140
-	        	'model'      => 'groups',
141
-	        	'created_at' => \DB::raw('NOW()'),
142
-	        	'updated_at' => \DB::raw('NOW()')
143
-	        	],
144
-	        	[
145
-	        	'name'       => 'delete',
146
-	        	'model'      => 'groups',
147
-	        	'created_at' => \DB::raw('NOW()'),
148
-	        	'updated_at' => \DB::raw('NOW()')
149
-	        	],
150
-	        	[
151
-	        	'name'       => 'find',
152
-	        	'model'      => 'groups',
153
-	        	'created_at' => \DB::raw('NOW()'),
154
-	        	'updated_at' => \DB::raw('NOW()')
155
-	        	],
156
-	        	[
157
-	        	'name'       => 'search',
158
-	        	'model'      => 'groups',
159
-	        	'created_at' => \DB::raw('NOW()'),
160
-	        	'updated_at' => \DB::raw('NOW()')
161
-	        	],
162
-	        	[
163
-	        	'name'       => 'list',
164
-	        	'model'      => 'groups',
165
-	        	'created_at' => \DB::raw('NOW()'),
166
-	        	'updated_at' => \DB::raw('NOW()')
167
-	        	],
168
-	        	[
169
-	        	'name'       => 'findby',
170
-	        	'model'      => 'groups',
171
-	        	'created_at' => \DB::raw('NOW()'),
172
-	        	'updated_at' => \DB::raw('NOW()')
173
-	        	],
174
-	        	[
175
-	        	'name'       => 'first',
176
-	        	'model'      => 'groups',
177
-	        	'created_at' => \DB::raw('NOW()'),
178
-	        	'updated_at' => \DB::raw('NOW()')
179
-	        	],
180
-	        	[
181
-	        	'name'       => 'paginate',
182
-	        	'model'      => 'groups',
183
-	        	'created_at' => \DB::raw('NOW()'),
184
-	        	'updated_at' => \DB::raw('NOW()')
185
-	        	],
186
-	        	[
187
-	        	'name'       => 'paginateby',
188
-	        	'model'      => 'groups',
189
-	        	'created_at' => \DB::raw('NOW()'),
190
-	        	'updated_at' => \DB::raw('NOW()')
191
-	        	],
192
-	        	[
193
-	        	'name'       => 'assignpermissions',
194
-	        	'model'      => 'groups',
195
-	        	'created_at' => \DB::raw('NOW()'),
196
-	        	'updated_at' => \DB::raw('NOW()')
197
-	        	],
198
-        	]
199
-        );
135
+				/**
136
+				 * Groups model permissions.
137
+				 */
138
+				[
139
+				'name'       => 'save',
140
+				'model'      => 'groups',
141
+				'created_at' => \DB::raw('NOW()'),
142
+				'updated_at' => \DB::raw('NOW()')
143
+				],
144
+				[
145
+				'name'       => 'delete',
146
+				'model'      => 'groups',
147
+				'created_at' => \DB::raw('NOW()'),
148
+				'updated_at' => \DB::raw('NOW()')
149
+				],
150
+				[
151
+				'name'       => 'find',
152
+				'model'      => 'groups',
153
+				'created_at' => \DB::raw('NOW()'),
154
+				'updated_at' => \DB::raw('NOW()')
155
+				],
156
+				[
157
+				'name'       => 'search',
158
+				'model'      => 'groups',
159
+				'created_at' => \DB::raw('NOW()'),
160
+				'updated_at' => \DB::raw('NOW()')
161
+				],
162
+				[
163
+				'name'       => 'list',
164
+				'model'      => 'groups',
165
+				'created_at' => \DB::raw('NOW()'),
166
+				'updated_at' => \DB::raw('NOW()')
167
+				],
168
+				[
169
+				'name'       => 'findby',
170
+				'model'      => 'groups',
171
+				'created_at' => \DB::raw('NOW()'),
172
+				'updated_at' => \DB::raw('NOW()')
173
+				],
174
+				[
175
+				'name'       => 'first',
176
+				'model'      => 'groups',
177
+				'created_at' => \DB::raw('NOW()'),
178
+				'updated_at' => \DB::raw('NOW()')
179
+				],
180
+				[
181
+				'name'       => 'paginate',
182
+				'model'      => 'groups',
183
+				'created_at' => \DB::raw('NOW()'),
184
+				'updated_at' => \DB::raw('NOW()')
185
+				],
186
+				[
187
+				'name'       => 'paginateby',
188
+				'model'      => 'groups',
189
+				'created_at' => \DB::raw('NOW()'),
190
+				'updated_at' => \DB::raw('NOW()')
191
+				],
192
+				[
193
+				'name'       => 'assignpermissions',
194
+				'model'      => 'groups',
195
+				'created_at' => \DB::raw('NOW()'),
196
+				'updated_at' => \DB::raw('NOW()')
197
+				],
198
+			]
199
+		);
200 200
 
201 201
 		/**
202 202
 		 * Delete previous data.
@@ -222,29 +222,29 @@  discard block
 block discarded – undo
222 222
 		 * Create Default users.
223 223
 		 */
224 224
 		$adminUserId = DB::table('users')->insertGetId(
225
-            [
225
+			[
226 226
 			'email'      => '[email protected]',
227 227
 			'password'   => bcrypt('123456'),
228 228
 			'created_at' => \DB::raw('NOW()'),
229 229
 			'updated_at' => \DB::raw('NOW()')
230 230
 			]
231
-        );
231
+		);
232 232
 
233 233
 		/**
234 234
 		 * Assign users to groups.
235 235
 		 */
236 236
 		DB::table('users_groups')->insert(
237
-        	[
238
-	            [
237
+			[
238
+				[
239 239
 				'user_id'    => $adminUserId,
240 240
 				'group_id'   => $adminGroupId,
241 241
 				'created_at' => \DB::raw('NOW()'),
242 242
 				'updated_at' => \DB::raw('NOW()')
243
-	            ]
244
-        	]
245
-        );
243
+				]
244
+			]
245
+		);
246 246
 
247
-        /**
247
+		/**
248 248
 		 * Assign the permissions to the admin group.
249 249
 		 */
250 250
 		$permissionIds = DB::table('permissions')->whereIn('model', ['users', 'permissions', 'groups'])->select('id')->lists('id');
Please login to merge, or discard this patch.
src/Modules/Core/AbstractRepositories/AbstractRepositoryContainer.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -4,35 +4,35 @@
 block discarded – undo
4 4
 
5 5
 abstract class AbstractRepositoryContainer implements RepositoryContainerInterface
6 6
 {
7
-    /**
8
-     * Construct the repository class name based on
9
-     * the method name called, search in the 
10
-     * given namespaces for the class and 
11
-     * return an instance.
12
-     * 
13
-     * @param  string $name the called method name
14
-     * @param  array  $arguments the method arguments
15
-     * @return object
16
-     */
7
+	/**
8
+	 * Construct the repository class name based on
9
+	 * the method name called, search in the 
10
+	 * given namespaces for the class and 
11
+	 * return an instance.
12
+	 * 
13
+	 * @param  string $name the called method name
14
+	 * @param  array  $arguments the method arguments
15
+	 * @return object
16
+	 */
17 17
 	public function __call($name, $arguments)
18
-    {
19
-        dd(\Request::header());
20
-    	foreach ($this->getRepoNameSpace() as $repoNameSpace) 
21
-    	{
22
-    		$class = rtrim($repoNameSpace, '\\') . '\\' . ucfirst(str_singular($name)) . 'Repository';
23
-    		if (class_exists($class)) 
24
-    		{
25
-        		return \App::make($class);
26
-    		}
27
-    	}
28
-    }
18
+	{
19
+		dd(\Request::header());
20
+		foreach ($this->getRepoNameSpace() as $repoNameSpace) 
21
+		{
22
+			$class = rtrim($repoNameSpace, '\\') . '\\' . ucfirst(str_singular($name)) . 'Repository';
23
+			if (class_exists($class)) 
24
+			{
25
+				return \App::make($class);
26
+			}
27
+		}
28
+	}
29 29
 
30
-     /**
31
-     * Abstract methods that return the necessary 
32
-     * information (repositories namespaces)
33
-     * needed to preform the previous actions.
34
-     * 
35
-     * @return array
36
-     */
37
-    abstract protected function getRepoNameSpace();
30
+	 /**
31
+	  * Abstract methods that return the necessary 
32
+	  * information (repositories namespaces)
33
+	  * needed to preform the previous actions.
34
+	  * 
35
+	  * @return array
36
+	  */
37
+	abstract protected function getRepoNameSpace();
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.