Completed
Push — master ( f50a49...f3277c )
by Sherif
03:02
created
src/Modules/V1/Acl/Database/Migrations/2015_12_20_124153_users.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,16 +13,16 @@
 block discarded – undo
13 13
 	public function up()
14 14
 	{
15 15
 		Schema::create('users', function (Blueprint $table) {
16
-            $table->increments('id');
17
-            $table->string('name', 100)->nullable();
18
-            $table->string('email')->unique();
19
-            $table->string('password', 60)->nullable();
20
-            $table->boolean('blocked')->default(0);
16
+			$table->increments('id');
17
+			$table->string('name', 100)->nullable();
18
+			$table->string('email')->unique();
19
+			$table->string('password', 60)->nullable();
20
+			$table->boolean('blocked')->default(0);
21 21
 			$table->date('last_change_password')->nullable();
22
-            $table->softDeletes();
23
-            $table->rememberToken();
24
-            $table->timestamps();
25
-        });
22
+			$table->softDeletes();
23
+			$table->rememberToken();
24
+			$table->timestamps();
25
+		});
26 26
 	}
27 27
 
28 28
 	/**
Please login to merge, or discard this patch.
src/Modules/V1/Core/Utl/ErrorHandler.php 1 patch
Indentation   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -2,105 +2,105 @@
 block discarded – undo
2 2
 
3 3
 class ErrorHandler
4 4
 {
5
-    public function unAuthorized()
6
-    {
7
-        $error = ['status' => 401, 'message' => trans('errors.unAuthorized')];
8
-        abort($error['status'], $error['message']);
9
-    }
10
-
11
-    public function tokenExpired()
12
-    {
13
-        $error = ['status' => 403, 'message' => trans('errors.tokenExpired')];
14
-        abort($error['status'], $error['message']);
15
-    }
16
-
17
-     public function noPermissions()
18
-    {
19
-        $error = ['status' => 403, 'message' => trans('errors.noPermissions')];
20
-        abort($error['status'], $error['message']);
21
-    }
22
-
23
-    public function loginFailed()
24
-    {
25
-        $error = ['status' => 400, 'message' => trans('errors.loginFailed')];
26
-        abort($error['status'], $error['message']);
27
-    }
28
-
29
-    public function noSocialEmail()
30
-    {
31
-        $error = ['status' => 400, 'message' => trans('errors.noSocialEmail')];
32
-        abort($error['status'], $error['message']);
33
-    }
34
-
35
-    public function userAlreadyRegistered()
36
-    {
37
-        $error = ['status' => 400, 'message' => trans('errors.userAlreadyRegistered')];
38
-        abort($error['status'], $error['message']);
39
-    }
40
-
41
-    public function connectionError()
42
-    {
43
-        $error = ['status' => 400, 'message' => trans('errors.connectionError')];
44
-        abort($error['status'], $error['message']);
45
-    }
46
-
47
-    public function redisNotRunning()
48
-    {
49
-        $error = ['status' => 400, 'message' => trans('errors.redisNotRunning')];
50
-        abort($error['status'], $error['message']);
51
-    }
52
-
53
-    public function dbQueryError()
54
-    {
55
-        $error = ['status' => 400, 'message' => trans('errors.dbQueryError')];
56
-        abort($error['status'], $error['message']);
57
-    }
58
-
59
-    public function cannotCreateSetting()
60
-    {
61
-        $error = ['status' => 400, 'message' => trans('errors.cannotCreateSetting')];
62
-        abort($error['status'], $error['message']);
63
-    }
64
-
65
-    public function cannotUpdateSettingKey()
66
-    {
67
-        $error = ['status' => 400, 'message' => trans('errors.cannotUpdateSettingKey')];
68
-        abort($error['status'], $error['message']);
69
-    }
70
-
71
-    public function userIsBlocked()
72
-    {
73
-        $error = ['status' => 403, 'message' => trans('errors.userIsBlocked')];
74
-        abort($error['status'], $error['message']);
75
-    }
76
-
77
-    public function invalidResetToken()
78
-    {
79
-        $error = ['status' => 400, 'message' => trans('errors.invalidResetToken')];
80
-        abort($error['status'], $error['message']);
81
-    }
82
-
83
-    public function invalidResetPassword()
84
-    {
85
-        $error = ['status' => 400, 'message' => trans('errors.invalidResetPassword')];
86
-        abort($error['status'], $error['message']);
87
-    }
88
-
89
-    public function invalidOldPassword()
90
-    {
91
-        $error = ['status' => 400, 'message' => trans('errors.invalidOldPassword')];
92
-        abort($error['status'], $error['message']);
93
-    }
94
-
95
-    public function notFound($text)
96
-    {
97
-        $error = ['status' => 404, 'message' => trans('errors.notFound', ['replace' => $text])];
98
-        abort($error['status'], $error['message']);
99
-    }
100
-
101
-    public function generalError()
102
-    {
103
-        $error = ['status' => 404, 'message' => trans('errors.generalError')];
104
-        abort($error['status'], $error['message']);
105
-    }
5
+	public function unAuthorized()
6
+	{
7
+		$error = ['status' => 401, 'message' => trans('errors.unAuthorized')];
8
+		abort($error['status'], $error['message']);
9
+	}
10
+
11
+	public function tokenExpired()
12
+	{
13
+		$error = ['status' => 403, 'message' => trans('errors.tokenExpired')];
14
+		abort($error['status'], $error['message']);
15
+	}
16
+
17
+	 public function noPermissions()
18
+	{
19
+		$error = ['status' => 403, 'message' => trans('errors.noPermissions')];
20
+		abort($error['status'], $error['message']);
21
+	}
22
+
23
+	public function loginFailed()
24
+	{
25
+		$error = ['status' => 400, 'message' => trans('errors.loginFailed')];
26
+		abort($error['status'], $error['message']);
27
+	}
28
+
29
+	public function noSocialEmail()
30
+	{
31
+		$error = ['status' => 400, 'message' => trans('errors.noSocialEmail')];
32
+		abort($error['status'], $error['message']);
33
+	}
34
+
35
+	public function userAlreadyRegistered()
36
+	{
37
+		$error = ['status' => 400, 'message' => trans('errors.userAlreadyRegistered')];
38
+		abort($error['status'], $error['message']);
39
+	}
40
+
41
+	public function connectionError()
42
+	{
43
+		$error = ['status' => 400, 'message' => trans('errors.connectionError')];
44
+		abort($error['status'], $error['message']);
45
+	}
46
+
47
+	public function redisNotRunning()
48
+	{
49
+		$error = ['status' => 400, 'message' => trans('errors.redisNotRunning')];
50
+		abort($error['status'], $error['message']);
51
+	}
52
+
53
+	public function dbQueryError()
54
+	{
55
+		$error = ['status' => 400, 'message' => trans('errors.dbQueryError')];
56
+		abort($error['status'], $error['message']);
57
+	}
58
+
59
+	public function cannotCreateSetting()
60
+	{
61
+		$error = ['status' => 400, 'message' => trans('errors.cannotCreateSetting')];
62
+		abort($error['status'], $error['message']);
63
+	}
64
+
65
+	public function cannotUpdateSettingKey()
66
+	{
67
+		$error = ['status' => 400, 'message' => trans('errors.cannotUpdateSettingKey')];
68
+		abort($error['status'], $error['message']);
69
+	}
70
+
71
+	public function userIsBlocked()
72
+	{
73
+		$error = ['status' => 403, 'message' => trans('errors.userIsBlocked')];
74
+		abort($error['status'], $error['message']);
75
+	}
76
+
77
+	public function invalidResetToken()
78
+	{
79
+		$error = ['status' => 400, 'message' => trans('errors.invalidResetToken')];
80
+		abort($error['status'], $error['message']);
81
+	}
82
+
83
+	public function invalidResetPassword()
84
+	{
85
+		$error = ['status' => 400, 'message' => trans('errors.invalidResetPassword')];
86
+		abort($error['status'], $error['message']);
87
+	}
88
+
89
+	public function invalidOldPassword()
90
+	{
91
+		$error = ['status' => 400, 'message' => trans('errors.invalidOldPassword')];
92
+		abort($error['status'], $error['message']);
93
+	}
94
+
95
+	public function notFound($text)
96
+	{
97
+		$error = ['status' => 404, 'message' => trans('errors.notFound', ['replace' => $text])];
98
+		abort($error['status'], $error['message']);
99
+	}
100
+
101
+	public function generalError()
102
+	{
103
+		$error = ['status' => 404, 'message' => trans('errors.generalError')];
104
+		abort($error['status'], $error['message']);
105
+	}
106 106
 }
107 107
\ No newline at end of file
Please login to merge, or discard this patch.
Database/Migrations/2016_01_24_123631_initialize_notifications.php 1 patch
Indentation   +133 added lines, -133 removed lines patch added patch discarded remove patch
@@ -13,140 +13,140 @@
 block discarded – undo
13 13
 	public function up()
14 14
 	{
15 15
 		/**
16
-         * Insert the permissions related to this module.
17
-         */
18
-        DB::table('permissions')->insert(
19
-        	[
20
-        		/**
21
-        		 * notifications model permissions.
22
-        		 */
23
-	        	[
24
-	        	'name'       => 'find',
25
-	        	'model'      => 'notifications',
26
-	        	'created_at' => \DB::raw('NOW()'),
27
-	        	'updated_at' => \DB::raw('NOW()')
28
-	        	],
29
-	        	[
30
-	        	'name'       => 'search',
31
-	        	'model'      => 'notifications',
32
-	        	'created_at' => \DB::raw('NOW()'),
33
-	        	'updated_at' => \DB::raw('NOW()')
34
-	        	],
35
-	        	[
36
-	        	'name'       => 'list',
37
-	        	'model'      => 'notifications',
38
-	        	'created_at' => \DB::raw('NOW()'),
39
-	        	'updated_at' => \DB::raw('NOW()')
40
-	        	],
41
-	        	[
42
-	        	'name'       => 'findby',
43
-	        	'model'      => 'notifications',
44
-	        	'created_at' => \DB::raw('NOW()'),
45
-	        	'updated_at' => \DB::raw('NOW()')
46
-	        	],
47
-	        	[
48
-	        	'name'       => 'first',
49
-	        	'model'      => 'notifications',
50
-	        	'created_at' => \DB::raw('NOW()'),
51
-	        	'updated_at' => \DB::raw('NOW()')
52
-	        	],
53
-	        	[
54
-	        	'name'       => 'paginate',
55
-	        	'model'      => 'notifications',
56
-	        	'created_at' => \DB::raw('NOW()'),
57
-	        	'updated_at' => \DB::raw('NOW()')
58
-	        	],
59
-	        	[
60
-	        	'name'       => 'paginateby',
61
-	        	'model'      => 'notifications',
62
-	        	'created_at' => \DB::raw('NOW()'),
63
-	        	'updated_at' => \DB::raw('NOW()')
64
-	        	],
65
-	        	[
66
-	        	'name'       => 'notified',
67
-	        	'model'      => 'notifications',
68
-	        	'created_at' => \DB::raw('NOW()'),
69
-	        	'updated_at' => \DB::raw('NOW()')
70
-	        	],
71
-	        	[
72
-	        	'name'       => 'notifyall',
73
-	        	'model'      => 'notifications',
74
-	        	'created_at' => \DB::raw('NOW()'),
75
-	        	'updated_at' => \DB::raw('NOW()')
76
-	        	],
77
-	        	/**
78
-        		 * pushNotificationDevices model permissions.
79
-        		 */
80
-	        	[
81
-	        	'name'       => 'find',
82
-	        	'model'      => 'pushNotificationDevices',
83
-	        	'created_at' => \DB::raw('NOW()'),
84
-	        	'updated_at' => \DB::raw('NOW()')
85
-	        	],
86
-	        	[
87
-	        	'name'       => 'search',
88
-	        	'model'      => 'pushNotificationDevices',
89
-	        	'created_at' => \DB::raw('NOW()'),
90
-	        	'updated_at' => \DB::raw('NOW()')
91
-	        	],
92
-	        	[
93
-	        	'name'       => 'list',
94
-	        	'model'      => 'pushNotificationDevices',
95
-	        	'created_at' => \DB::raw('NOW()'),
96
-	        	'updated_at' => \DB::raw('NOW()')
97
-	        	],
98
-	        	[
99
-	        	'name'       => 'findby',
100
-	        	'model'      => 'pushNotificationDevices',
101
-	        	'created_at' => \DB::raw('NOW()'),
102
-	        	'updated_at' => \DB::raw('NOW()')
103
-	        	],
104
-	        	[
105
-	        	'name'       => 'first',
106
-	        	'model'      => 'pushNotificationDevices',
107
-	        	'created_at' => \DB::raw('NOW()'),
108
-	        	'updated_at' => \DB::raw('NOW()')
109
-	        	],
110
-	        	[
111
-	        	'name'       => 'paginate',
112
-	        	'model'      => 'pushNotificationDevices',
113
-	        	'created_at' => \DB::raw('NOW()'),
114
-	        	'updated_at' => \DB::raw('NOW()')
115
-	        	],
116
-	        	[
117
-	        	'name'       => 'paginateby',
118
-	        	'model'      => 'pushNotificationDevices',
119
-	        	'created_at' => \DB::raw('NOW()'),
120
-	        	'updated_at' => \DB::raw('NOW()')
121
-	        	],
122
-	        	[
123
-	        	'name'       => 'save',
124
-	        	'model'      => 'pushNotificationDevices',
125
-	        	'created_at' => \DB::raw('NOW()'),
126
-	        	'updated_at' => \DB::raw('NOW()')
127
-	        	],
128
-	        	[
129
-	        	'name'       => 'delete',
130
-	        	'model'      => 'pushNotificationDevices',
131
-	        	'created_at' => \DB::raw('NOW()'),
132
-	        	'updated_at' => \DB::raw('NOW()')
133
-	        	],
134
-                [
135
-                'name'       => 'deleted',
136
-                'model'      => 'pushNotificationDevices',
137
-                'created_at' => \DB::raw('NOW()'),
138
-                'updated_at' => \DB::raw('NOW()')
139
-                ],
140
-                [
141
-                'name'       => 'restore',
142
-                'model'      => 'pushNotificationDevices',
143
-                'created_at' => \DB::raw('NOW()'),
144
-                'updated_at' => \DB::raw('NOW()')
145
-                ],
146
-        	]
147
-        );
16
+		 * Insert the permissions related to this module.
17
+		 */
18
+		DB::table('permissions')->insert(
19
+			[
20
+				/**
21
+				 * notifications model permissions.
22
+				 */
23
+				[
24
+				'name'       => 'find',
25
+				'model'      => 'notifications',
26
+				'created_at' => \DB::raw('NOW()'),
27
+				'updated_at' => \DB::raw('NOW()')
28
+				],
29
+				[
30
+				'name'       => 'search',
31
+				'model'      => 'notifications',
32
+				'created_at' => \DB::raw('NOW()'),
33
+				'updated_at' => \DB::raw('NOW()')
34
+				],
35
+				[
36
+				'name'       => 'list',
37
+				'model'      => 'notifications',
38
+				'created_at' => \DB::raw('NOW()'),
39
+				'updated_at' => \DB::raw('NOW()')
40
+				],
41
+				[
42
+				'name'       => 'findby',
43
+				'model'      => 'notifications',
44
+				'created_at' => \DB::raw('NOW()'),
45
+				'updated_at' => \DB::raw('NOW()')
46
+				],
47
+				[
48
+				'name'       => 'first',
49
+				'model'      => 'notifications',
50
+				'created_at' => \DB::raw('NOW()'),
51
+				'updated_at' => \DB::raw('NOW()')
52
+				],
53
+				[
54
+				'name'       => 'paginate',
55
+				'model'      => 'notifications',
56
+				'created_at' => \DB::raw('NOW()'),
57
+				'updated_at' => \DB::raw('NOW()')
58
+				],
59
+				[
60
+				'name'       => 'paginateby',
61
+				'model'      => 'notifications',
62
+				'created_at' => \DB::raw('NOW()'),
63
+				'updated_at' => \DB::raw('NOW()')
64
+				],
65
+				[
66
+				'name'       => 'notified',
67
+				'model'      => 'notifications',
68
+				'created_at' => \DB::raw('NOW()'),
69
+				'updated_at' => \DB::raw('NOW()')
70
+				],
71
+				[
72
+				'name'       => 'notifyall',
73
+				'model'      => 'notifications',
74
+				'created_at' => \DB::raw('NOW()'),
75
+				'updated_at' => \DB::raw('NOW()')
76
+				],
77
+				/**
78
+				 * pushNotificationDevices model permissions.
79
+				 */
80
+				[
81
+				'name'       => 'find',
82
+				'model'      => 'pushNotificationDevices',
83
+				'created_at' => \DB::raw('NOW()'),
84
+				'updated_at' => \DB::raw('NOW()')
85
+				],
86
+				[
87
+				'name'       => 'search',
88
+				'model'      => 'pushNotificationDevices',
89
+				'created_at' => \DB::raw('NOW()'),
90
+				'updated_at' => \DB::raw('NOW()')
91
+				],
92
+				[
93
+				'name'       => 'list',
94
+				'model'      => 'pushNotificationDevices',
95
+				'created_at' => \DB::raw('NOW()'),
96
+				'updated_at' => \DB::raw('NOW()')
97
+				],
98
+				[
99
+				'name'       => 'findby',
100
+				'model'      => 'pushNotificationDevices',
101
+				'created_at' => \DB::raw('NOW()'),
102
+				'updated_at' => \DB::raw('NOW()')
103
+				],
104
+				[
105
+				'name'       => 'first',
106
+				'model'      => 'pushNotificationDevices',
107
+				'created_at' => \DB::raw('NOW()'),
108
+				'updated_at' => \DB::raw('NOW()')
109
+				],
110
+				[
111
+				'name'       => 'paginate',
112
+				'model'      => 'pushNotificationDevices',
113
+				'created_at' => \DB::raw('NOW()'),
114
+				'updated_at' => \DB::raw('NOW()')
115
+				],
116
+				[
117
+				'name'       => 'paginateby',
118
+				'model'      => 'pushNotificationDevices',
119
+				'created_at' => \DB::raw('NOW()'),
120
+				'updated_at' => \DB::raw('NOW()')
121
+				],
122
+				[
123
+				'name'       => 'save',
124
+				'model'      => 'pushNotificationDevices',
125
+				'created_at' => \DB::raw('NOW()'),
126
+				'updated_at' => \DB::raw('NOW()')
127
+				],
128
+				[
129
+				'name'       => 'delete',
130
+				'model'      => 'pushNotificationDevices',
131
+				'created_at' => \DB::raw('NOW()'),
132
+				'updated_at' => \DB::raw('NOW()')
133
+				],
134
+				[
135
+				'name'       => 'deleted',
136
+				'model'      => 'pushNotificationDevices',
137
+				'created_at' => \DB::raw('NOW()'),
138
+				'updated_at' => \DB::raw('NOW()')
139
+				],
140
+				[
141
+				'name'       => 'restore',
142
+				'model'      => 'pushNotificationDevices',
143
+				'created_at' => \DB::raw('NOW()'),
144
+				'updated_at' => \DB::raw('NOW()')
145
+				],
146
+			]
147
+		);
148 148
 
149
-        /**
149
+		/**
150 150
 		 * Assign the permissions to the admin group.
151 151
 		 */
152 152
 		$permissionIds = DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices'])->select('id')->pluck('id');
Please login to merge, or discard this patch.
src/Modules/V1/Acl/ModelObservers/AclPermissionObserver.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -5,44 +5,44 @@
 block discarded – undo
5 5
  */
6 6
 class AclPermissionObserver {
7 7
 
8
-    public function saving($model)
9
-    {
10
-        //
11
-    }
12
-
13
-    public function saved($model)
14
-    {
15
-        //
16
-    }
17
-
18
-    public function creating($model)
19
-    {
20
-        //
21
-    }
22
-
23
-    public function created($model)
24
-    {
25
-        //
26
-    }
27
-
28
-    public function updating($model)
29
-    {
30
-        //
31
-    }
32
-
33
-    public function updated($model)
34
-    {
35
-        //
36
-    }
37
-
38
-    public function deleting($model)
39
-    {
40
-        //
41
-    }
42
-
43
-    public function deleted($model)
44
-    {
45
-        //
46
-    }
8
+	public function saving($model)
9
+	{
10
+		//
11
+	}
12
+
13
+	public function saved($model)
14
+	{
15
+		//
16
+	}
17
+
18
+	public function creating($model)
19
+	{
20
+		//
21
+	}
22
+
23
+	public function created($model)
24
+	{
25
+		//
26
+	}
27
+
28
+	public function updating($model)
29
+	{
30
+		//
31
+	}
32
+
33
+	public function updated($model)
34
+	{
35
+		//
36
+	}
37
+
38
+	public function deleting($model)
39
+	{
40
+		//
41
+	}
42
+
43
+	public function deleted($model)
44
+	{
45
+		//
46
+	}
47 47
 
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
src/Modules/V1/Acl/Database/Migrations/2016_01_05_130507_initialize_acl.php 1 patch
Indentation   +233 added lines, -233 removed lines patch added patch discarded remove patch
@@ -13,233 +13,233 @@  discard block
 block discarded – undo
13 13
 	public function up()
14 14
 	{
15 15
 		/**
16
-         * Insert the permissions related to this module.
17
-         */
18
-        DB::table('permissions')->insert(
19
-        	[
20
-        		/**
21
-        		 * Users model permissions.
22
-        		 */
23
-	        	[
24
-	        	'name'       => 'save',
25
-	        	'model'      => 'users',
26
-	        	'created_at' => \DB::raw('NOW()'),
27
-	        	'updated_at' => \DB::raw('NOW()')
28
-	        	],
29
-	        	[
30
-	        	'name'       => 'delete',
31
-	        	'model'      => 'users',
32
-	        	'created_at' => \DB::raw('NOW()'),
33
-	        	'updated_at' => \DB::raw('NOW()')
34
-	        	],
35
-	        	[
36
-	        	'name'       => 'find',
37
-	        	'model'      => 'users',
38
-	        	'created_at' => \DB::raw('NOW()'),
39
-	        	'updated_at' => \DB::raw('NOW()')
40
-	        	],
41
-	        	[
42
-	        	'name'       => 'list',
43
-	        	'model'      => 'users',
44
-	        	'created_at' => \DB::raw('NOW()'),
45
-	        	'updated_at' => \DB::raw('NOW()')
46
-	        	],
47
-	        	[
48
-	        	'name'       => 'search',
49
-	        	'model'      => 'users',
50
-	        	'created_at' => \DB::raw('NOW()'),
51
-	        	'updated_at' => \DB::raw('NOW()')
52
-	        	],
53
-	        	[
54
-	        	'name'       => 'findby',
55
-	        	'model'      => 'users',
56
-	        	'created_at' => \DB::raw('NOW()'),
57
-	        	'updated_at' => \DB::raw('NOW()')
58
-	        	],
59
-	        	[
60
-	        	'name'       => 'first',
61
-	        	'model'      => 'users',
62
-	        	'created_at' => \DB::raw('NOW()'),
63
-	        	'updated_at' => \DB::raw('NOW()')
64
-	        	],
65
-	        	[
66
-	        	'name'       => 'paginate',
67
-	        	'model'      => 'users',
68
-	        	'created_at' => \DB::raw('NOW()'),
69
-	        	'updated_at' => \DB::raw('NOW()')
70
-	        	],
71
-	        	[
72
-	        	'name'       => 'paginateby',
73
-	        	'model'      => 'users',
74
-	        	'created_at' => \DB::raw('NOW()'),
75
-	        	'updated_at' => \DB::raw('NOW()')
76
-	        	],
77
-	        	[
78
-	        	'name'       => 'assigngroups',
79
-	        	'model'      => 'users',
80
-	        	'created_at' => \DB::raw('NOW()'),
81
-	        	'updated_at' => \DB::raw('NOW()')
82
-	        	],
83
-	        	[
84
-	        	'name'       => 'block',
85
-	        	'model'      => 'users',
86
-	        	'created_at' => \DB::raw('NOW()'),
87
-	        	'updated_at' => \DB::raw('NOW()')
88
-	        	],
89
-	        	[
90
-	        	'name'       => 'unblock',
91
-	        	'model'      => 'users',
92
-	        	'created_at' => \DB::raw('NOW()'),
93
-	        	'updated_at' => \DB::raw('NOW()')
94
-	        	],
95
-	        	[
96
-	        	'name'       => 'group',
97
-	        	'model'      => 'users',
98
-	        	'created_at' => \DB::raw('NOW()'),
99
-	        	'updated_at' => \DB::raw('NOW()')
100
-	        	],
101
-                [
102
-                'name'       => 'deleted',
103
-                'model'      => 'users',
104
-                'created_at' => \DB::raw('NOW()'),
105
-                'updated_at' => \DB::raw('NOW()')
106
-                ],
107
-                [
108
-                'name'       => 'restore',
109
-                'model'      => 'users',
110
-                'created_at' => \DB::raw('NOW()'),
111
-                'updated_at' => \DB::raw('NOW()')
112
-                ],
16
+		 * Insert the permissions related to this module.
17
+		 */
18
+		DB::table('permissions')->insert(
19
+			[
20
+				/**
21
+				 * Users model permissions.
22
+				 */
23
+				[
24
+				'name'       => 'save',
25
+				'model'      => 'users',
26
+				'created_at' => \DB::raw('NOW()'),
27
+				'updated_at' => \DB::raw('NOW()')
28
+				],
29
+				[
30
+				'name'       => 'delete',
31
+				'model'      => 'users',
32
+				'created_at' => \DB::raw('NOW()'),
33
+				'updated_at' => \DB::raw('NOW()')
34
+				],
35
+				[
36
+				'name'       => 'find',
37
+				'model'      => 'users',
38
+				'created_at' => \DB::raw('NOW()'),
39
+				'updated_at' => \DB::raw('NOW()')
40
+				],
41
+				[
42
+				'name'       => 'list',
43
+				'model'      => 'users',
44
+				'created_at' => \DB::raw('NOW()'),
45
+				'updated_at' => \DB::raw('NOW()')
46
+				],
47
+				[
48
+				'name'       => 'search',
49
+				'model'      => 'users',
50
+				'created_at' => \DB::raw('NOW()'),
51
+				'updated_at' => \DB::raw('NOW()')
52
+				],
53
+				[
54
+				'name'       => 'findby',
55
+				'model'      => 'users',
56
+				'created_at' => \DB::raw('NOW()'),
57
+				'updated_at' => \DB::raw('NOW()')
58
+				],
59
+				[
60
+				'name'       => 'first',
61
+				'model'      => 'users',
62
+				'created_at' => \DB::raw('NOW()'),
63
+				'updated_at' => \DB::raw('NOW()')
64
+				],
65
+				[
66
+				'name'       => 'paginate',
67
+				'model'      => 'users',
68
+				'created_at' => \DB::raw('NOW()'),
69
+				'updated_at' => \DB::raw('NOW()')
70
+				],
71
+				[
72
+				'name'       => 'paginateby',
73
+				'model'      => 'users',
74
+				'created_at' => \DB::raw('NOW()'),
75
+				'updated_at' => \DB::raw('NOW()')
76
+				],
77
+				[
78
+				'name'       => 'assigngroups',
79
+				'model'      => 'users',
80
+				'created_at' => \DB::raw('NOW()'),
81
+				'updated_at' => \DB::raw('NOW()')
82
+				],
83
+				[
84
+				'name'       => 'block',
85
+				'model'      => 'users',
86
+				'created_at' => \DB::raw('NOW()'),
87
+				'updated_at' => \DB::raw('NOW()')
88
+				],
89
+				[
90
+				'name'       => 'unblock',
91
+				'model'      => 'users',
92
+				'created_at' => \DB::raw('NOW()'),
93
+				'updated_at' => \DB::raw('NOW()')
94
+				],
95
+				[
96
+				'name'       => 'group',
97
+				'model'      => 'users',
98
+				'created_at' => \DB::raw('NOW()'),
99
+				'updated_at' => \DB::raw('NOW()')
100
+				],
101
+				[
102
+				'name'       => 'deleted',
103
+				'model'      => 'users',
104
+				'created_at' => \DB::raw('NOW()'),
105
+				'updated_at' => \DB::raw('NOW()')
106
+				],
107
+				[
108
+				'name'       => 'restore',
109
+				'model'      => 'users',
110
+				'created_at' => \DB::raw('NOW()'),
111
+				'updated_at' => \DB::raw('NOW()')
112
+				],
113 113
 
114
-	        	/**
115
-        		 * Permissions model permissions.
116
-        		 */
117
-        		[
118
-	        	'name'       => 'find',
119
-	        	'model'      => 'permissions',
120
-	        	'created_at' => \DB::raw('NOW()'),
121
-	        	'updated_at' => \DB::raw('NOW()')
122
-	        	],
123
-	        	[
124
-	        	'name'       => 'search',
125
-	        	'model'      => 'permissions',
126
-	        	'created_at' => \DB::raw('NOW()'),
127
-	        	'updated_at' => \DB::raw('NOW()')
128
-	        	],
129
-	        	[
130
-	        	'name'       => 'list',
131
-	        	'model'      => 'permissions',
132
-	        	'created_at' => \DB::raw('NOW()'),
133
-	        	'updated_at' => \DB::raw('NOW()')
134
-	        	],
135
-	        	[
136
-	        	'name'       => 'findby',
137
-	        	'model'      => 'permissions',
138
-	        	'created_at' => \DB::raw('NOW()'),
139
-	        	'updated_at' => \DB::raw('NOW()')
140
-	        	],
141
-	        	[
142
-	        	'name'       => 'first',
143
-	        	'model'      => 'permissions',
144
-	        	'created_at' => \DB::raw('NOW()'),
145
-	        	'updated_at' => \DB::raw('NOW()')
146
-	        	],
147
-	        	[
148
-	        	'name'       => 'paginate',
149
-	        	'model'      => 'permissions',
150
-	        	'created_at' => \DB::raw('NOW()'),
151
-	        	'updated_at' => \DB::raw('NOW()')
152
-	        	],
153
-	        	[
154
-	        	'name'       => 'paginateby',
155
-	        	'model'      => 'permissions',
156
-	        	'created_at' => \DB::raw('NOW()'),
157
-	        	'updated_at' => \DB::raw('NOW()')
158
-	        	],
114
+				/**
115
+				 * Permissions model permissions.
116
+				 */
117
+				[
118
+				'name'       => 'find',
119
+				'model'      => 'permissions',
120
+				'created_at' => \DB::raw('NOW()'),
121
+				'updated_at' => \DB::raw('NOW()')
122
+				],
123
+				[
124
+				'name'       => 'search',
125
+				'model'      => 'permissions',
126
+				'created_at' => \DB::raw('NOW()'),
127
+				'updated_at' => \DB::raw('NOW()')
128
+				],
129
+				[
130
+				'name'       => 'list',
131
+				'model'      => 'permissions',
132
+				'created_at' => \DB::raw('NOW()'),
133
+				'updated_at' => \DB::raw('NOW()')
134
+				],
135
+				[
136
+				'name'       => 'findby',
137
+				'model'      => 'permissions',
138
+				'created_at' => \DB::raw('NOW()'),
139
+				'updated_at' => \DB::raw('NOW()')
140
+				],
141
+				[
142
+				'name'       => 'first',
143
+				'model'      => 'permissions',
144
+				'created_at' => \DB::raw('NOW()'),
145
+				'updated_at' => \DB::raw('NOW()')
146
+				],
147
+				[
148
+				'name'       => 'paginate',
149
+				'model'      => 'permissions',
150
+				'created_at' => \DB::raw('NOW()'),
151
+				'updated_at' => \DB::raw('NOW()')
152
+				],
153
+				[
154
+				'name'       => 'paginateby',
155
+				'model'      => 'permissions',
156
+				'created_at' => \DB::raw('NOW()'),
157
+				'updated_at' => \DB::raw('NOW()')
158
+				],
159 159
 
160
-	        	/**
161
-        		 * Groups model permissions.
162
-        		 */
163
-	        	[
164
-	        	'name'       => 'save',
165
-	        	'model'      => 'groups',
166
-	        	'created_at' => \DB::raw('NOW()'),
167
-	        	'updated_at' => \DB::raw('NOW()')
168
-	        	],
169
-	        	[
170
-	        	'name'       => 'delete',
171
-	        	'model'      => 'groups',
172
-	        	'created_at' => \DB::raw('NOW()'),
173
-	        	'updated_at' => \DB::raw('NOW()')
174
-	        	],
175
-	        	[
176
-	        	'name'       => 'find',
177
-	        	'model'      => 'groups',
178
-	        	'created_at' => \DB::raw('NOW()'),
179
-	        	'updated_at' => \DB::raw('NOW()')
180
-	        	],
181
-	        	[
182
-	        	'name'       => 'search',
183
-	        	'model'      => 'groups',
184
-	        	'created_at' => \DB::raw('NOW()'),
185
-	        	'updated_at' => \DB::raw('NOW()')
186
-	        	],
187
-	        	[
188
-	        	'name'       => 'list',
189
-	        	'model'      => 'groups',
190
-	        	'created_at' => \DB::raw('NOW()'),
191
-	        	'updated_at' => \DB::raw('NOW()')
192
-	        	],
193
-	        	[
194
-	        	'name'       => 'findby',
195
-	        	'model'      => 'groups',
196
-	        	'created_at' => \DB::raw('NOW()'),
197
-	        	'updated_at' => \DB::raw('NOW()')
198
-	        	],
199
-	        	[
200
-	        	'name'       => 'first',
201
-	        	'model'      => 'groups',
202
-	        	'created_at' => \DB::raw('NOW()'),
203
-	        	'updated_at' => \DB::raw('NOW()')
204
-	        	],
205
-	        	[
206
-	        	'name'       => 'paginate',
207
-	        	'model'      => 'groups',
208
-	        	'created_at' => \DB::raw('NOW()'),
209
-	        	'updated_at' => \DB::raw('NOW()')
210
-	        	],
211
-	        	[
212
-	        	'name'       => 'paginateby',
213
-	        	'model'      => 'groups',
214
-	        	'created_at' => \DB::raw('NOW()'),
215
-	        	'updated_at' => \DB::raw('NOW()')
216
-	        	],
217
-	        	[
218
-	        	'name'       => 'assignpermissions',
219
-	        	'model'      => 'groups',
220
-	        	'created_at' => \DB::raw('NOW()'),
221
-	        	'updated_at' => \DB::raw('NOW()')
222
-	        	],
223
-	        	[
224
-	        	'name'       => 'users',
225
-	        	'model'      => 'groups',
226
-	        	'created_at' => \DB::raw('NOW()'),
227
-	        	'updated_at' => \DB::raw('NOW()')
228
-	        	],
229
-                [
230
-                'name'       => 'deleted',
231
-                'model'      => 'groups',
232
-                'created_at' => \DB::raw('NOW()'),
233
-                'updated_at' => \DB::raw('NOW()')
234
-                ],
235
-                [
236
-                'name'       => 'restore',
237
-                'model'      => 'groups',
238
-                'created_at' => \DB::raw('NOW()'),
239
-                'updated_at' => \DB::raw('NOW()')
240
-                ],
241
-        	]
242
-        );
160
+				/**
161
+				 * Groups model permissions.
162
+				 */
163
+				[
164
+				'name'       => 'save',
165
+				'model'      => 'groups',
166
+				'created_at' => \DB::raw('NOW()'),
167
+				'updated_at' => \DB::raw('NOW()')
168
+				],
169
+				[
170
+				'name'       => 'delete',
171
+				'model'      => 'groups',
172
+				'created_at' => \DB::raw('NOW()'),
173
+				'updated_at' => \DB::raw('NOW()')
174
+				],
175
+				[
176
+				'name'       => 'find',
177
+				'model'      => 'groups',
178
+				'created_at' => \DB::raw('NOW()'),
179
+				'updated_at' => \DB::raw('NOW()')
180
+				],
181
+				[
182
+				'name'       => 'search',
183
+				'model'      => 'groups',
184
+				'created_at' => \DB::raw('NOW()'),
185
+				'updated_at' => \DB::raw('NOW()')
186
+				],
187
+				[
188
+				'name'       => 'list',
189
+				'model'      => 'groups',
190
+				'created_at' => \DB::raw('NOW()'),
191
+				'updated_at' => \DB::raw('NOW()')
192
+				],
193
+				[
194
+				'name'       => 'findby',
195
+				'model'      => 'groups',
196
+				'created_at' => \DB::raw('NOW()'),
197
+				'updated_at' => \DB::raw('NOW()')
198
+				],
199
+				[
200
+				'name'       => 'first',
201
+				'model'      => 'groups',
202
+				'created_at' => \DB::raw('NOW()'),
203
+				'updated_at' => \DB::raw('NOW()')
204
+				],
205
+				[
206
+				'name'       => 'paginate',
207
+				'model'      => 'groups',
208
+				'created_at' => \DB::raw('NOW()'),
209
+				'updated_at' => \DB::raw('NOW()')
210
+				],
211
+				[
212
+				'name'       => 'paginateby',
213
+				'model'      => 'groups',
214
+				'created_at' => \DB::raw('NOW()'),
215
+				'updated_at' => \DB::raw('NOW()')
216
+				],
217
+				[
218
+				'name'       => 'assignpermissions',
219
+				'model'      => 'groups',
220
+				'created_at' => \DB::raw('NOW()'),
221
+				'updated_at' => \DB::raw('NOW()')
222
+				],
223
+				[
224
+				'name'       => 'users',
225
+				'model'      => 'groups',
226
+				'created_at' => \DB::raw('NOW()'),
227
+				'updated_at' => \DB::raw('NOW()')
228
+				],
229
+				[
230
+				'name'       => 'deleted',
231
+				'model'      => 'groups',
232
+				'created_at' => \DB::raw('NOW()'),
233
+				'updated_at' => \DB::raw('NOW()')
234
+				],
235
+				[
236
+				'name'       => 'restore',
237
+				'model'      => 'groups',
238
+				'created_at' => \DB::raw('NOW()'),
239
+				'updated_at' => \DB::raw('NOW()')
240
+				],
241
+			]
242
+		);
243 243
 
244 244
 		/**
245 245
 		 * Create Default groups.
@@ -256,29 +256,29 @@  discard block
 block discarded – undo
256 256
 		 * Create Default users.
257 257
 		 */
258 258
 		$adminUserId = DB::table('users')->insertGetId(
259
-            [
259
+			[
260 260
 			'email'      => '[email protected]',
261 261
 			'password'   => bcrypt('123456'),
262 262
 			'created_at' => \DB::raw('NOW()'),
263 263
 			'updated_at' => \DB::raw('NOW()')
264 264
 			]
265
-        );
265
+		);
266 266
 
267 267
 		/**
268 268
 		 * Assign users to groups.
269 269
 		 */
270 270
 		DB::table('users_groups')->insert(
271
-        	[
272
-	            [
271
+			[
272
+				[
273 273
 				'user_id'    => $adminUserId,
274 274
 				'group_id'   => $adminGroupId,
275 275
 				'created_at' => \DB::raw('NOW()'),
276 276
 				'updated_at' => \DB::raw('NOW()')
277
-	            ]
278
-        	]
279
-        );
277
+				]
278
+			]
279
+		);
280 280
 
281
-        /**
281
+		/**
282 282
 		 * Assign the permissions to the admin group.
283 283
 		 */
284 284
 		$permissionIds = DB::table('permissions')->whereIn('model', ['users', 'permissions', 'groups'])->select('id')->pluck('id');
Please login to merge, or discard this patch.
src/Modules/V1/Reporting/ModelObservers/ReprotObserver.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -5,44 +5,44 @@
 block discarded – undo
5 5
  */
6 6
 class ReprotObserver {
7 7
 
8
-    public function saving($model)
9
-    {
10
-        //
11
-    }
12
-
13
-    public function saved($model)
14
-    {
15
-        //
16
-    }
17
-
18
-    public function creating($model)
19
-    {
20
-        //
21
-    }
22
-
23
-    public function created($model)
24
-    {
25
-        //
26
-    }
27
-
28
-    public function updating($model)
29
-    {
30
-        //
31
-    }
32
-
33
-    public function updated($model)
34
-    {
35
-        //
36
-    }
37
-
38
-    public function deleting($model)
39
-    {
40
-        //
41
-    }
42
-
43
-    public function deleted($model)
44
-    {
45
-        //
46
-    }
8
+	public function saving($model)
9
+	{
10
+		//
11
+	}
12
+
13
+	public function saved($model)
14
+	{
15
+		//
16
+	}
17
+
18
+	public function creating($model)
19
+	{
20
+		//
21
+	}
22
+
23
+	public function created($model)
24
+	{
25
+		//
26
+	}
27
+
28
+	public function updating($model)
29
+	{
30
+		//
31
+	}
32
+
33
+	public function updated($model)
34
+	{
35
+		//
36
+	}
37
+
38
+	public function deleting($model)
39
+	{
40
+		//
41
+	}
42
+
43
+	public function deleted($model)
44
+	{
45
+		//
46
+	}
47 47
 
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
V1/Reporting/Database/Migrations/2016_01_24_123631_initialize_reports.php 1 patch
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -13,65 +13,65 @@
 block discarded – undo
13 13
 	public function up()
14 14
 	{
15 15
 		/**
16
-         * Insert the permissions related to this module.
17
-         */
18
-        DB::table('permissions')->insert(
19
-        	[
20
-        		/**
21
-        		 * Reporting model permissions.
22
-        		 */
23
-	        	[
24
-	        	'name'       => 'find',
25
-	        	'model'      => 'reports',
26
-	        	'created_at' => \DB::raw('NOW()'),
27
-	        	'updated_at' => \DB::raw('NOW()')
28
-	        	],
29
-	        	[
30
-	        	'name'       => 'search',
31
-	        	'model'      => 'reports',
32
-	        	'created_at' => \DB::raw('NOW()'),
33
-	        	'updated_at' => \DB::raw('NOW()')
34
-	        	],
35
-	        	[
36
-	        	'name'       => 'list',
37
-	        	'model'      => 'reports',
38
-	        	'created_at' => \DB::raw('NOW()'),
39
-	        	'updated_at' => \DB::raw('NOW()')
40
-	        	],
41
-	        	[
42
-	        	'name'       => 'findby',
43
-	        	'model'      => 'reports',
44
-	        	'created_at' => \DB::raw('NOW()'),
45
-	        	'updated_at' => \DB::raw('NOW()')
46
-	        	],
47
-	        	[
48
-	        	'name'       => 'first',
49
-	        	'model'      => 'reports',
50
-	        	'created_at' => \DB::raw('NOW()'),
51
-	        	'updated_at' => \DB::raw('NOW()')
52
-	        	],
53
-	        	[
54
-	        	'name'       => 'paginate',
55
-	        	'model'      => 'reports',
56
-	        	'created_at' => \DB::raw('NOW()'),
57
-	        	'updated_at' => \DB::raw('NOW()')
58
-	        	],
59
-	        	[
60
-	        	'name'       => 'paginateby',
61
-	        	'model'      => 'reports',
62
-	        	'created_at' => \DB::raw('NOW()'),
63
-	        	'updated_at' => \DB::raw('NOW()')
64
-	        	],
65
-	        	[
66
-	        	'name'       => 'admin_count',
67
-	        	'model'      => 'reports',
68
-	        	'created_at' => \DB::raw('NOW()'),
69
-	        	'updated_at' => \DB::raw('NOW()')
70
-	        	]
71
-        	]
72
-        );
16
+		 * Insert the permissions related to this module.
17
+		 */
18
+		DB::table('permissions')->insert(
19
+			[
20
+				/**
21
+				 * Reporting model permissions.
22
+				 */
23
+				[
24
+				'name'       => 'find',
25
+				'model'      => 'reports',
26
+				'created_at' => \DB::raw('NOW()'),
27
+				'updated_at' => \DB::raw('NOW()')
28
+				],
29
+				[
30
+				'name'       => 'search',
31
+				'model'      => 'reports',
32
+				'created_at' => \DB::raw('NOW()'),
33
+				'updated_at' => \DB::raw('NOW()')
34
+				],
35
+				[
36
+				'name'       => 'list',
37
+				'model'      => 'reports',
38
+				'created_at' => \DB::raw('NOW()'),
39
+				'updated_at' => \DB::raw('NOW()')
40
+				],
41
+				[
42
+				'name'       => 'findby',
43
+				'model'      => 'reports',
44
+				'created_at' => \DB::raw('NOW()'),
45
+				'updated_at' => \DB::raw('NOW()')
46
+				],
47
+				[
48
+				'name'       => 'first',
49
+				'model'      => 'reports',
50
+				'created_at' => \DB::raw('NOW()'),
51
+				'updated_at' => \DB::raw('NOW()')
52
+				],
53
+				[
54
+				'name'       => 'paginate',
55
+				'model'      => 'reports',
56
+				'created_at' => \DB::raw('NOW()'),
57
+				'updated_at' => \DB::raw('NOW()')
58
+				],
59
+				[
60
+				'name'       => 'paginateby',
61
+				'model'      => 'reports',
62
+				'created_at' => \DB::raw('NOW()'),
63
+				'updated_at' => \DB::raw('NOW()')
64
+				],
65
+				[
66
+				'name'       => 'admin_count',
67
+				'model'      => 'reports',
68
+				'created_at' => \DB::raw('NOW()'),
69
+				'updated_at' => \DB::raw('NOW()')
70
+				]
71
+			]
72
+		);
73 73
 
74
-        /**
74
+		/**
75 75
 		 * Assign the permissions to the admin group.
76 76
 		 */
77 77
 		$permissionIds = DB::table('permissions')->whereIn('model', ['reports'])->select('id')->pluck('id');
Please login to merge, or discard this patch.
src/Modules/V1/Reporting/Providers/ModuleServiceProvider.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -7,23 +7,23 @@
 block discarded – undo
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9 9
 	/**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'catalog');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'catalog');
18
-    }
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'catalog');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'catalog');
18
+	}
19 19
 
20
-    /**
21
-     * Register the module services.
22
-     *
23
-     * @return void
24
-     */
25
-    public function register()
26
-    {
27
-        $this->app->register(RouteServiceProvider::class);
28
-    }
20
+	/**
21
+	 * Register the module services.
22
+	 *
23
+	 * @return void
24
+	 */
25
+	public function register()
26
+	{
27
+		$this->app->register(RouteServiceProvider::class);
28
+	}
29 29
 }
Please login to merge, or discard this patch.
src/Modules/V1/Core/Database/Migrations/2016_01_19_084705_logs.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 			$table->integer('user_id');
22 22
 			$table->softDeletes();
23 23
 			$table->timestamps();
24
-        });
24
+		});
25 25
 	}
26 26
 
27 27
 	/**
Please login to merge, or discard this patch.