@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | public static function themeColor() |
89 | 89 | { |
90 | 90 | $cbUser = cbUser(); |
91 | - return ($cbUser)?$cbUser->role()->theme_color : 'skin-blue'; |
|
91 | + return ($cbUser) ? $cbUser->role()->theme_color : 'skin-blue'; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | public static function denyAccess() |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | { |
106 | 106 | $roleId = cbUser()->cms_roles_id; |
107 | 107 | |
108 | - return cache()->rememberForever('cb_admin_privileges_roles'. $roleId, function () use ($roleId) { |
|
108 | + return cache()->rememberForever('cb_admin_privileges_roles'.$roleId, function() use ($roleId) { |
|
109 | 109 | return \DB::table('cms_roles_privileges')->where('cms_roles_id', $roleId)->join('cms_modules', 'cms_modules.id', '=', 'cms_roles_privileges.cms_modules_id')->select('cms_modules.name', 'cms_modules.path', 'can_see_module', 'can_create', 'can_read', 'can_edit', 'can_delete')->get() ?: []; |
110 | 110 | }); |
111 | 111 | } |
@@ -94,7 +94,7 @@ |
||
94 | 94 | return redirect()->route("ModulesControllerGetStep1"); |
95 | 95 | } |
96 | 96 | |
97 | - public function getStep1($id=null,Step1Handler $handler) |
|
97 | + public function getStep1($id = null, Step1Handler $handler) |
|
98 | 98 | { |
99 | 99 | $this->cbLoader(); |
100 | 100 |
@@ -8,10 +8,10 @@ discard block |
||
8 | 8 | |
9 | 9 | class Step1Handler |
10 | 10 | { |
11 | - public function showForm($id=null) |
|
11 | + public function showForm($id = null) |
|
12 | 12 | { |
13 | 13 | $data['id'] = $id; |
14 | - return view('CbModulesGen::step1',$data); |
|
14 | + return view('CbModulesGen::step1', $data); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | public function handleFormSubmit() |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | $icon = request('icon'); |
22 | 22 | $path = request('path'); |
23 | 23 | |
24 | - if (! request('id')) { |
|
24 | + if (!request('id')) { |
|
25 | 25 | if (ModulesRepo::modulePathExists($path)) { |
26 | 26 | //todo: should be translated |
27 | 27 | backWithMsg('Sorry the slug has already exists, please choose another !', 'warning'); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | if (file_exists(controller_path($row->controller))) { |
40 | 40 | $response = FileManipulator::readCtrlContent(str_replace('.', '', $row->controller)); |
41 | - }else{ |
|
41 | + } else { |
|
42 | 42 | $response = file_get_contents(__DIR__.'Step1Handler.php/'.str_replace('.', '', $row->controller).'.php'); |
43 | 43 | } |
44 | 44 |