Passed
Push — master ( c9dd23...72fffe )
by Ferry
03:51
created
src/types/file/Hook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function assignment($value, $column)
23 23
     {
24 24
         $ext = strtolower(pathinfo($value, PATHINFO_EXTENSION));
25
-        if(in_array($ext, cbConfig("UPLOAD_FILE_EXTENSION_ALLOWED"))) {
25
+        if (in_array($ext, cbConfig("UPLOAD_FILE_EXTENSION_ALLOWED"))) {
26 26
             return $value;
27 27
         }
28 28
     }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function detailRender($row, $column)
31 31
     {
32 32
         $column->setValue($row->{ $column->getField() });
33
-        return view("types::file.detail",[
33
+        return view("types::file.detail", [
34 34
             'row'=>$row,
35 35
             'column'=>$column
36 36
         ]);
Please login to merge, or discard this patch.
src/controllers/CBController.php 2 patches
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function getIndex()
34 34
     {
35
-        if(!module()->canBrowse()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
35
+        if (!module()->canBrowse()) return cb()->redirect(cb()->getAdminUrl(), cbLang("you_dont_have_privilege_to_this_area"));
36 36
 
37 37
         $query = $this->repository();
38
-        $result = $query->paginate( request("limit")?:$this->data['limit'] );
38
+        $result = $query->paginate(request("limit") ?: $this->data['limit']);
39 39
         $data['result'] = $result;
40 40
 
41 41
         return view("crudbooster::module.index.index", array_merge($data, $this->data));
@@ -43,17 +43,17 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function getAdd()
45 45
     {
46
-        if(!module()->canCreate()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
46
+        if (!module()->canCreate()) return cb()->redirect(cb()->getAdminUrl(), cbLang("you_dont_have_privilege_to_this_area"));
47 47
 
48 48
         $data = [];
49 49
         $data['page_title'] = $this->data['page_title'].' : '.cbLang('add');
50 50
         $data['action_url'] = module()->addSaveURL();
51
-        return view('crudbooster::module.form.form',array_merge($data, $this->data));
51
+        return view('crudbooster::module.form.form', array_merge($data, $this->data));
52 52
     }
53 53
 
54 54
     public function postAddSave()
55 55
     {
56
-        if(!module()->canCreate()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
56
+        if (!module()->canCreate()) return cb()->redirect(cb()->getAdminUrl(), cbLang("you_dont_have_privilege_to_this_area"));
57 57
 
58 58
         try {
59 59
             $this->validation();
@@ -61,38 +61,38 @@  discard block
 block discarded – undo
61 61
             $data = columnSingleton()->getAssignmentData();
62 62
 
63 63
             //Clear data from Primary Key
64
-            unset($data[ cb()->pk($this->data['table']) ]);
64
+            unset($data[cb()->pk($this->data['table'])]);
65 65
 
66
-            if(Schema::hasColumn($this->data['table'], 'created_at')) {
66
+            if (Schema::hasColumn($this->data['table'], 'created_at')) {
67 67
                 $data['created_at'] = date('Y-m-d H:i:s');
68 68
             }
69 69
 
70
-            if(Schema::hasColumn($this->data['table'], 'updated_at')) {
70
+            if (Schema::hasColumn($this->data['table'], 'updated_at')) {
71 71
                 $data['updated_at'] = date('Y-m-d H:i:s');
72 72
             }
73 73
 
74
-            if(isset($this->data['hook_before_insert']) && is_callable($this->data['hook_before_insert'])) {
74
+            if (isset($this->data['hook_before_insert']) && is_callable($this->data['hook_before_insert'])) {
75 75
                 $data = call_user_func($this->data['hook_before_insert'], $data);
76 76
             }
77 77
 
78 78
             $id = DB::table($this->data['table'])->insertGetId($data);
79 79
 
80
-            if(isset($this->data['hook_after_insert']) && is_callable($this->data['hook_after_insert'])) {
80
+            if (isset($this->data['hook_after_insert']) && is_callable($this->data['hook_after_insert'])) {
81 81
                 call_user_func($this->data['hook_after_insert'], $id);
82 82
             }
83 83
 
84 84
         } catch (CBValidationException $e) {
85 85
             Log::debug($e);
86
-            return cb()->redirectBack($e->getMessage(),'info');
86
+            return cb()->redirectBack($e->getMessage(), 'info');
87 87
         } catch (\Exception $e) {
88 88
             Log::error($e);
89
-            return cb()->redirectBack(cbLang("something_went_wrong"),'warning');
89
+            return cb()->redirectBack(cbLang("something_went_wrong"), 'warning');
90 90
         }
91 91
 
92
-        if (Str::contains(request("submit"),cbLang("more"))) {
92
+        if (Str::contains(request("submit"), cbLang("more"))) {
93 93
             return cb()->redirectBack(cbLang("the_data_has_been_added"), 'success');
94 94
         } else {
95
-            if(verifyReferalUrl()) {
95
+            if (verifyReferalUrl()) {
96 96
                 return cb()->redirect(getReferalUrl("url"), cbLang("the_data_has_been_added"), 'success');
97 97
             } else {
98 98
                 return cb()->redirect(module()->url(), cbLang("the_data_has_been_added"), 'success');
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
     public function getEdit($id)
104 104
     {
105
-        if(!module()->canUpdate()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
105
+        if (!module()->canUpdate()) return cb()->redirect(cb()->getAdminUrl(), cbLang("you_dont_have_privilege_to_this_area"));
106 106
 
107 107
         $data = [];
108 108
         $data['row'] = $this->repository()->where($this->data['table'].'.'.getPrimaryKey($this->data['table']), $id)->first();
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
     public function postEditSave($id)
115 115
     {
116
-        if(!module()->canUpdate()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
116
+        if (!module()->canUpdate()) return cb()->redirect(cb()->getAdminUrl(), cbLang("you_dont_have_privilege_to_this_area"));
117 117
 
118 118
         try {
119 119
             $this->validation();
@@ -121,40 +121,40 @@  discard block
 block discarded – undo
121 121
             $data = columnSingleton()->getAssignmentData();
122 122
 
123 123
             // Make sure the Primary Key is not included
124
-            unset($data[ cb()->pk($this->data['table']) ]);
124
+            unset($data[cb()->pk($this->data['table'])]);
125 125
 
126
-            if(Schema::hasColumn($this->data['table'], 'updated_at')) {
126
+            if (Schema::hasColumn($this->data['table'], 'updated_at')) {
127 127
                 $data['updated_at'] = date('Y-m-d H:i:s');
128 128
             }
129 129
 
130 130
             unset($data['created_at']);
131 131
 
132
-            if(isset($this->data['hook_before_update']) && is_callable($this->data['hook_before_update'])) {
132
+            if (isset($this->data['hook_before_update']) && is_callable($this->data['hook_before_update'])) {
133 133
                 $data = call_user_func($this->data['hook_before_update'], $data, $id);
134 134
             }
135 135
 
136 136
             cb()->update($this->data['table'], $id, $data);
137 137
 
138
-            if(isset($this->data['hook_after_update']) && is_callable($this->data['hook_after_update'])) {
138
+            if (isset($this->data['hook_after_update']) && is_callable($this->data['hook_after_update'])) {
139 139
                 call_user_func($this->data['hook_after_update'], $id);
140 140
             }
141 141
 
142 142
         } catch (CBValidationException $e) {
143 143
             Log::debug($e);
144
-            return cb()->redirectBack($e->getMessage(),'info');
144
+            return cb()->redirectBack($e->getMessage(), 'info');
145 145
         } catch (\Exception $e) {
146 146
             Log::error($e);
147
-            return cb()->redirectBack(cbLang("something_went_wrong"),'warning');
147
+            return cb()->redirectBack(cbLang("something_went_wrong"), 'warning');
148 148
         }
149 149
 
150 150
 
151 151
         if (Str::contains(request("submit"), cbLang("more"))) {
152
-            return cb()->redirectBack( cbLang("the_data_has_been_updated"), 'success');
152
+            return cb()->redirectBack(cbLang("the_data_has_been_updated"), 'success');
153 153
         } else {
154
-            if(verifyReferalUrl()) {
155
-                return cb()->redirect(getReferalUrl("url"),  cbLang("the_data_has_been_updated"), 'success');
154
+            if (verifyReferalUrl()) {
155
+                return cb()->redirect(getReferalUrl("url"), cbLang("the_data_has_been_updated"), 'success');
156 156
             } else {
157
-                return cb()->redirect(module()->url(),  cbLang("the_data_has_been_updated"), 'success');
157
+                return cb()->redirect(module()->url(), cbLang("the_data_has_been_updated"), 'success');
158 158
             }
159 159
 
160 160
         }
@@ -162,15 +162,15 @@  discard block
 block discarded – undo
162 162
 
163 163
     public function getDelete($id)
164 164
     {
165
-        if(!module()->canDelete()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
165
+        if (!module()->canDelete()) return cb()->redirect(cb()->getAdminUrl(), cbLang("you_dont_have_privilege_to_this_area"));
166 166
 
167
-        if(isset($this->data['hook_before_delete']) && is_callable($this->data['hook_before_delete'])) {
167
+        if (isset($this->data['hook_before_delete']) && is_callable($this->data['hook_before_delete'])) {
168 168
             call_user_func($this->data['hook_before_delete'], $id);
169 169
         }
170 170
 
171
-        $softDelete = isset($this->data['disable_soft_delete'])?$this->data['disable_soft_delete']:true;
171
+        $softDelete = isset($this->data['disable_soft_delete']) ? $this->data['disable_soft_delete'] : true;
172 172
 
173
-        if ($softDelete === true && Schema::hasColumn($this->data['table'],'deleted_at')) {
173
+        if ($softDelete === true && Schema::hasColumn($this->data['table'], 'deleted_at')) {
174 174
             DB::table($this->data['table'])
175 175
                 ->where(getPrimaryKey($this->data['table']), $id)
176 176
                 ->update(['deleted_at' => date('Y-m-d H:i:s')]);
@@ -180,16 +180,16 @@  discard block
 block discarded – undo
180 180
                 ->delete();
181 181
         }
182 182
 
183
-        if(isset($this->data['hook_after_delete']) && is_callable($this->data['hook_after_delete'])) {
183
+        if (isset($this->data['hook_after_delete']) && is_callable($this->data['hook_after_delete'])) {
184 184
             call_user_func($this->data['hook_after_delete'], $id);
185 185
         }
186 186
 
187
-        return cb()->redirectBack( cbLang("the_data_has_been_deleted"), 'success');
187
+        return cb()->redirectBack(cbLang("the_data_has_been_deleted"), 'success');
188 188
     }
189 189
 
190 190
     public function getDetail($id)
191 191
     {
192
-        if(!module()->canRead()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
192
+        if (!module()->canRead()) return cb()->redirect(cb()->getAdminUrl(), cbLang("you_dont_have_privilege_to_this_area"));
193 193
 
194 194
         $data = [];
195 195
         $data['row'] = $this->repository()->where($this->data['table'].'.'.cb()->findPrimaryKey($this->data['table']), $id)->first();
@@ -208,14 +208,14 @@  discard block
 block discarded – undo
208 208
      */
209 209
     public function __call($method, $parameters)
210 210
     {
211
-        if($method == "getData") {
211
+        if ($method == "getData") {
212 212
             $key = $parameters[0];
213
-            if(isset($this->data[$key])) {
213
+            if (isset($this->data[$key])) {
214 214
                 return $this->data[$key];
215
-            }else{
215
+            } else {
216 216
                 return null;
217 217
             }
218
-        }else{
218
+        } else {
219 219
             return null;
220 220
         }
221 221
     }
Please login to merge, or discard this patch.
Braces   +23 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function getIndex()
34 34
     {
35
-        if(!module()->canBrowse()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
35
+        if(!module()->canBrowse()) {
36
+            return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
37
+        }
36 38
 
37 39
         $query = $this->repository();
38 40
         $result = $query->paginate( request("limit")?:$this->data['limit'] );
@@ -43,7 +45,9 @@  discard block
 block discarded – undo
43 45
 
44 46
     public function getAdd()
45 47
     {
46
-        if(!module()->canCreate()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
48
+        if(!module()->canCreate()) {
49
+            return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
50
+        }
47 51
 
48 52
         $data = [];
49 53
         $data['page_title'] = $this->data['page_title'].' : '.cbLang('add');
@@ -53,7 +57,9 @@  discard block
 block discarded – undo
53 57
 
54 58
     public function postAddSave()
55 59
     {
56
-        if(!module()->canCreate()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
60
+        if(!module()->canCreate()) {
61
+            return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
62
+        }
57 63
 
58 64
         try {
59 65
             $this->validation();
@@ -102,7 +108,9 @@  discard block
 block discarded – undo
102 108
 
103 109
     public function getEdit($id)
104 110
     {
105
-        if(!module()->canUpdate()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
111
+        if(!module()->canUpdate()) {
112
+            return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
113
+        }
106 114
 
107 115
         $data = [];
108 116
         $data['row'] = $this->repository()->where($this->data['table'].'.'.getPrimaryKey($this->data['table']), $id)->first();
@@ -113,7 +121,9 @@  discard block
 block discarded – undo
113 121
 
114 122
     public function postEditSave($id)
115 123
     {
116
-        if(!module()->canUpdate()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
124
+        if(!module()->canUpdate()) {
125
+            return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
126
+        }
117 127
 
118 128
         try {
119 129
             $this->validation();
@@ -162,7 +172,9 @@  discard block
 block discarded – undo
162 172
 
163 173
     public function getDelete($id)
164 174
     {
165
-        if(!module()->canDelete()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
175
+        if(!module()->canDelete()) {
176
+            return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
177
+        }
166 178
 
167 179
         if(isset($this->data['hook_before_delete']) && is_callable($this->data['hook_before_delete'])) {
168 180
             call_user_func($this->data['hook_before_delete'], $id);
@@ -189,7 +201,9 @@  discard block
 block discarded – undo
189 201
 
190 202
     public function getDetail($id)
191 203
     {
192
-        if(!module()->canRead()) return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
204
+        if(!module()->canRead()) {
205
+            return cb()->redirect(cb()->getAdminUrl(),cbLang("you_dont_have_privilege_to_this_area"));
206
+        }
193 207
 
194 208
         $data = [];
195 209
         $data['row'] = $this->repository()->where($this->data['table'].'.'.cb()->findPrimaryKey($this->data['table']), $id)->first();
@@ -212,10 +226,10 @@  discard block
 block discarded – undo
212 226
             $key = $parameters[0];
213 227
             if(isset($this->data[$key])) {
214 228
                 return $this->data[$key];
215
-            }else{
229
+            } else{
216 230
                 return null;
217 231
             }
218
-        }else{
232
+        } else{
219 233
             return null;
220 234
         }
221 235
     }
Please login to merge, or discard this patch.
src/routes.php 2 patches
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,59 +1,59 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Developer Backend Middleware
4
-Route::group(['middleware' => ['web',\crocodicstudio\crudbooster\middlewares\CBDeveloper::class],
4
+Route::group(['middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBDeveloper::class],
5 5
     'prefix'=>"developer/".getSetting('developer_path'),
6
-    'namespace' => 'crocodicstudio\crudbooster\controllers'], function () {
6
+    'namespace' => 'crocodicstudio\crudbooster\controllers'], function() {
7 7
     cb()->routeController("modules", "\crocodicstudio\crudbooster\controllers\DeveloperModulesController");
8 8
     cb()->routeController("menus", "\crocodicstudio\crudbooster\controllers\DeveloperMenusController");
9
-    cb()->routeController("roles","\crocodicstudio\crudbooster\controllers\DeveloperRolesController");
10
-    cb()->routeController("users","\crocodicstudio\crudbooster\controllers\DeveloperUsersController");
11
-    cb()->routeController("plugins","\crocodicstudio\crudbooster\controllers\DeveloperPluginStoreController");
12
-    cb()->routeController("mail","\crocodicstudio\crudbooster\controllers\DeveloperMailController");
13
-    cb()->routeController("security","\crocodicstudio\crudbooster\controllers\DeveloperSecurityController");
14
-    cb()->routeController("themes","\crocodicstudio\crudbooster\controllers\DeveloperThemesController");
15
-    cb()->routeController("appearance","\crocodicstudio\crudbooster\controllers\DeveloperAppearanceController");
16
-    cb()->routeController("miscellaneous","\crocodicstudio\crudbooster\controllers\DeveloperMiscellaneousController");
17
-    cb()->routePost("skip-tutorial","DeveloperDashboardController@postSkipTutorial");
18
-    cb()->routeGet("/","DeveloperDashboardController@getIndex");
9
+    cb()->routeController("roles", "\crocodicstudio\crudbooster\controllers\DeveloperRolesController");
10
+    cb()->routeController("users", "\crocodicstudio\crudbooster\controllers\DeveloperUsersController");
11
+    cb()->routeController("plugins", "\crocodicstudio\crudbooster\controllers\DeveloperPluginStoreController");
12
+    cb()->routeController("mail", "\crocodicstudio\crudbooster\controllers\DeveloperMailController");
13
+    cb()->routeController("security", "\crocodicstudio\crudbooster\controllers\DeveloperSecurityController");
14
+    cb()->routeController("themes", "\crocodicstudio\crudbooster\controllers\DeveloperThemesController");
15
+    cb()->routeController("appearance", "\crocodicstudio\crudbooster\controllers\DeveloperAppearanceController");
16
+    cb()->routeController("miscellaneous", "\crocodicstudio\crudbooster\controllers\DeveloperMiscellaneousController");
17
+    cb()->routePost("skip-tutorial", "DeveloperDashboardController@postSkipTutorial");
18
+    cb()->routeGet("/", "DeveloperDashboardController@getIndex");
19 19
 });
20 20
 
21 21
 // Developer Auth Middleware
22 22
 Route::group(['middleware' => ['web'],
23 23
     'prefix'=>"developer/".getSetting('developer_path'),
24
-    'namespace' => 'crocodicstudio\crudbooster\controllers'], function () {
25
-    cb()->routePost("login","AdminAuthController@postLoginDeveloper");
26
-    cb()->routeGet("login","AdminAuthController@getLoginDeveloper");
27
-    cb()->routeGet("logout","AdminAuthController@getLogoutDeveloper");
24
+    'namespace' => 'crocodicstudio\crudbooster\controllers'], function() {
25
+    cb()->routePost("login", "AdminAuthController@postLoginDeveloper");
26
+    cb()->routeGet("login", "AdminAuthController@getLoginDeveloper");
27
+    cb()->routeGet("logout", "AdminAuthController@getLogoutDeveloper");
28 28
 });
29 29
 
30 30
 // Routing without any middleware
31
-Route::group(['middleware' => ['web'], 'namespace' => '\crocodicstudio\crudbooster\controllers'], function () {
32
-    if(getSetting("AUTO_REDIRECT_TO_LOGIN")) {
33
-        cb()->routeGet("/","AdminAuthController@getRedirectToLogin");
31
+Route::group(['middleware' => ['web'], 'namespace' => '\crocodicstudio\crudbooster\controllers'], function() {
32
+    if (getSetting("AUTO_REDIRECT_TO_LOGIN")) {
33
+        cb()->routeGet("/", "AdminAuthController@getRedirectToLogin");
34 34
     }
35 35
 });
36 36
 
37 37
 // Routing without any middleware with admin prefix
38
-Route::group(['middleware' => ['web'], 'prefix' => cb()->getAdminPath(), 'namespace' => 'crocodicstudio\crudbooster\controllers'], function () {
38
+Route::group(['middleware' => ['web'], 'prefix' => cb()->getAdminPath(), 'namespace' => 'crocodicstudio\crudbooster\controllers'], function() {
39 39
     cb()->routeGet('logout', "AdminAuthController@getLogout");
40 40
 
41
-    if(!getSetting("DISABLE_LOGIN")) {
41
+    if (!getSetting("DISABLE_LOGIN")) {
42 42
         cb()->routePost('login', "AdminAuthController@postLogin");
43 43
         cb()->routeGet('login', "AdminAuthController@getLogin");
44 44
     }
45 45
 
46
-    if(getSetting("enable_forget")) {
47
-        cb()->routePost("forget","AdminAuthController@postForget");
46
+    if (getSetting("enable_forget")) {
47
+        cb()->routePost("forget", "AdminAuthController@postForget");
48 48
     }
49 49
 
50
-    if(getSetting("enable_register")) {
51
-        cb()->routePost("register","AdminAuthController@postRegister");
50
+    if (getSetting("enable_register")) {
51
+        cb()->routePost("register", "AdminAuthController@postRegister");
52 52
     }
53 53
 });
54 54
 
55 55
 // Routing package controllers
56
-cb()->routeGroupBackend(function () {
56
+cb()->routeGroupBackend(function() {
57 57
     cb()->routeController('profile', '\crocodicstudio\crudbooster\controllers\AdminProfileController');
58 58
 });
59 59
 
@@ -62,24 +62,24 @@  discard block
 block discarded – undo
62 62
     'middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBBackend::class],
63 63
     'prefix' => cb()->getAdminPath(),
64 64
     'namespace' => 'App\Http\Controllers',
65
-], function () {
65
+], function() {
66 66
 
67 67
     if (Request::is(cb()->getAdminPath())) {
68
-        if($dashboard = getSetting("dashboard_controller")) {
68
+        if ($dashboard = getSetting("dashboard_controller")) {
69 69
             cb()->routeGet("/", $dashboard."@getIndex");
70
-        }else{
70
+        } else {
71 71
             cb()->routeGet("/", "\crocodicstudio\crudbooster\controllers\AdminDashboardController@getIndex");
72 72
         }
73 73
     }
74 74
 
75 75
     $controllers = glob(app_path('Http/Controllers/Admin*Controller.php'));
76 76
 
77
-    foreach($controllers as $controller) {
77
+    foreach ($controllers as $controller) {
78 78
         $controllerName = basename($controller);
79
-        $controllerName = rtrim($controllerName,".php");
79
+        $controllerName = rtrim($controllerName, ".php");
80 80
         $className = '\App\Http\Controllers\\'.$controllerName;
81 81
         $controllerClass = new $className();
82
-        if(method_exists($controllerClass, 'cbInit')) {
82
+        if (method_exists($controllerClass, 'cbInit')) {
83 83
             cb()->routeController($controllerClass->getData('permalink'), $controllerName);
84 84
         }
85 85
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     if (Request::is(cb()->getAdminPath())) {
68 68
         if($dashboard = getSetting("dashboard_controller")) {
69 69
             cb()->routeGet("/", $dashboard."@getIndex");
70
-        }else{
70
+        } else{
71 71
             cb()->routeGet("/", "\crocodicstudio\crudbooster\controllers\AdminDashboardController@getIndex");
72 72
         }
73 73
     }
Please login to merge, or discard this patch.