@@ -38,7 +38,7 @@ |
||
38 | 38 | |
39 | 39 | protected function redirectTo() |
40 | 40 | { |
41 | - return '/'.Auth::user()->roles()->first()->redirect; |
|
41 | + return '/' . Auth::user()->roles()->first()->redirect; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | protected function redirectTo() |
38 | 38 | { |
39 | - return '/'.Auth::user()->roles()->first()->redirect; |
|
39 | + return '/' . Auth::user()->roles()->first()->redirect; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -57,10 +57,10 @@ discard block |
||
57 | 57 | protected function validateLogin(\Illuminate\Http\Request $request) |
58 | 58 | { |
59 | 59 | $this->validate($request, [ |
60 | - $this->username() => 'required|exists:users,'.$this->username().',active,1', |
|
60 | + $this->username() => 'required|exists:users,' . $this->username() . ',active,1', |
|
61 | 61 | 'password' => 'required', |
62 | 62 | ], [ |
63 | - $this->username().'.exists' => 'The selected email is invalid or the account is not active.', |
|
63 | + $this->username() . '.exists' => 'The selected email is invalid or the account is not active.', |
|
64 | 64 | ]); |
65 | 65 | } |
66 | 66 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | { |
126 | 126 | $repeater = Content::where('slug', $slug)->first(); |
127 | 127 | |
128 | - $filename = $repeater->slug.'.json'; |
|
128 | + $filename = $repeater->slug . '.json'; |
|
129 | 129 | $handle = fopen($filename, 'w+'); |
130 | 130 | fputs($handle, $repeater->toJson(JSON_PRETTY_PRINT)); |
131 | 131 | fclose($handle); |
@@ -144,18 +144,18 @@ discard block |
||
144 | 144 | $fields_slug = $request->get('fields_slug'); |
145 | 145 | $count = count($fields_slug); |
146 | 146 | for ($i = 0; $i < $count; $i++) { |
147 | - $content['fields'][$content_slug.'_'.$fields_slug[$i]]['label'] = $request->get('fields_label')[$i]; |
|
148 | - $content['fields'][$content_slug.'_'.$fields_slug[$i]]['type'] = $request->get('fields_type')[$i]; |
|
149 | - $content['fields'][$content_slug.'_'.$fields_slug[$i]]['class'] = $request->get('fields_class')[$i]; |
|
150 | - $content['fields'][$content_slug.'_'.$fields_slug[$i]]['placeholder'] = $request->get('fields_placeholder')[$i]; |
|
151 | - $content['fields'][$content_slug.'_'.$fields_slug[$i]]['validation'] = $request->get('fields_validation')[$i]; |
|
152 | - $content['fields'][$content_slug.'_'.$fields_slug[$i]]['value'] = $request->get('fields_value')[$i]; |
|
147 | + $content['fields'][$content_slug . '_' . $fields_slug[$i]]['label'] = $request->get('fields_label')[$i]; |
|
148 | + $content['fields'][$content_slug . '_' . $fields_slug[$i]]['type'] = $request->get('fields_type')[$i]; |
|
149 | + $content['fields'][$content_slug . '_' . $fields_slug[$i]]['class'] = $request->get('fields_class')[$i]; |
|
150 | + $content['fields'][$content_slug . '_' . $fields_slug[$i]]['placeholder'] = $request->get('fields_placeholder')[$i]; |
|
151 | + $content['fields'][$content_slug . '_' . $fields_slug[$i]]['validation'] = $request->get('fields_validation')[$i]; |
|
152 | + $content['fields'][$content_slug . '_' . $fields_slug[$i]]['value'] = $request->get('fields_value')[$i]; |
|
153 | 153 | $fieldsCount = count(explode(';', $request->get('fields_attributes_name')[$i])); |
154 | 154 | for ($k = 0; $k < $fieldsCount; $k++) { |
155 | - $content['fields'][$content_slug.'_'.$fields_slug[$i]]['attributes'][explode(';', $request->get('fields_attributes_name')[$i])[$k]] = explode(';', $request->get('fields_attributes_value')[$i])[$k]; |
|
155 | + $content['fields'][$content_slug . '_' . $fields_slug[$i]]['attributes'][explode(';', $request->get('fields_attributes_name')[$i])[$k]] = explode(';', $request->get('fields_attributes_value')[$i])[$k]; |
|
156 | 156 | } |
157 | - $content['fields'][$content_slug.'_'.$fields_slug[$i]]['required'] = $request->get('fields_required')[$i]; |
|
158 | - $content['fields'][$content_slug.'_'.$fields_slug[$i]]['table'] = $request->get('fields_table')[$i]; |
|
157 | + $content['fields'][$content_slug . '_' . $fields_slug[$i]]['required'] = $request->get('fields_required')[$i]; |
|
158 | + $content['fields'][$content_slug . '_' . $fields_slug[$i]]['table'] = $request->get('fields_table')[$i]; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | $content['actions']['store'] = $request->get('action_store'); |
@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | return view('chuckcms::vendor.chuck-menu.menu-front-end', $data); |
42 | 42 | } |
43 | 43 | if ($fileslug == null) { |
44 | - return view($tslug.'::vendor.chuck-menu.menu-front-end', $data); |
|
44 | + return view($tslug . '::vendor.chuck-menu.menu-front-end', $data); |
|
45 | 45 | } |
46 | 46 | |
47 | - return view($tslug.'::vendor.chuck-menu.'.$fileslug, $data); |
|
47 | + return view($tslug . '::vendor.chuck-menu.' . $fileslug, $data); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | public function scripts() |
@@ -54,14 +54,14 @@ discard block |
||
54 | 54 | |
55 | 55 | public function select($name = 'menu', $menulist = []) |
56 | 56 | { |
57 | - $html = '<select name="'.$name.'">'; |
|
57 | + $html = '<select name="' . $name . '">'; |
|
58 | 58 | |
59 | 59 | foreach ($menulist as $key => $val) { |
60 | 60 | $active = ''; |
61 | 61 | if (request()->input('menu') == $key) { |
62 | 62 | $active = 'selected="selected"'; |
63 | 63 | } |
64 | - $html .= '<option '.$active.' value="'.$key.'">'.$val.'</option>'; |
|
64 | + $html .= '<option ' . $active . ' value="' . $key . '">' . $val . '</option>'; |
|
65 | 65 | } |
66 | 66 | $html .= '</select>'; |
67 | 67 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $menuItem = new MenuItems(); |
81 | 81 | $menu_list = $menuItem->getall($menu_id); |
82 | 82 | |
83 | - $roots = $menu_list->where('menu', (int) $menu_id)->where('parent', 0); |
|
83 | + $roots = $menu_list->where('menu', (int)$menu_id)->where('parent', 0); |
|
84 | 84 | |
85 | 85 | $items = self::tree($roots, $menu_list); |
86 | 86 |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | // PAGEBLOCK CONTAINS A LOOP, LET'S RETRIEVE IT |
43 | 43 | if (strpos($findThis[0], 'LOOP') !== false) { |
44 | 44 | $repeater_slug = implode(' ', $this->getResources($body, '[LOOP=', ']')); |
45 | - $repeater_body = implode(' ', $this->getResources($body, '[LOOP='.$repeater_slug.']', '[/LOOP]')); |
|
45 | + $repeater_body = implode(' ', $this->getResources($body, '[LOOP=' . $repeater_slug . ']', '[/LOOP]')); |
|
46 | 46 | |
47 | - $newbody = str_replace('[LOOP='.$repeater_slug.']'.$repeater_body.'[/LOOP]', $this->getRepeaterContents($repeater_slug, $repeater_body), $body); |
|
47 | + $newbody = str_replace('[LOOP=' . $repeater_slug . ']' . $repeater_body . '[/LOOP]', $this->getRepeaterContents($repeater_slug, $repeater_body), $body); |
|
48 | 48 | |
49 | 49 | // THERE IS NO LOOP, CONTINUE |
50 | 50 | } elseif (strpos($findThis[0], 'FORM') !== false) {// PAGEBLOCK CONTAINS A FORM, LET'S RETRIEVE IT |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | // PAGEBLOCK CONTAINS A LOOP, LET'S RETRIEVE IT |
93 | 93 | if (strpos($findThis[0], 'LOOP') !== false) { |
94 | 94 | $repeater_slug = implode(' ', $this->getResources($body, '[LOOP=', ']')); |
95 | - $repeater_body = implode(' ', $this->getResources($body, '[LOOP='.$repeater_slug.']', '[/LOOP]')); |
|
95 | + $repeater_body = implode(' ', $this->getResources($body, '[LOOP=' . $repeater_slug . ']', '[/LOOP]')); |
|
96 | 96 | |
97 | - $newbody = str_replace('[LOOP='.$repeater_slug.']'.$repeater_body.'[/LOOP]', $this->getRepeaterContents($repeater_slug, $repeater_body), $body); |
|
97 | + $newbody = str_replace('[LOOP=' . $repeater_slug . ']' . $repeater_body . '[/LOOP]', $this->getRepeaterContents($repeater_slug, $repeater_body), $body); |
|
98 | 98 | |
99 | 99 | // THERE IS NO LOOP, CONTINUE |
100 | 100 | } elseif (strpos($findThis[0], 'FORM') !== false) {// PAGEBLOCK CONTAINS A FORM, LET'S RETRIEVE IT |
@@ -152,12 +152,12 @@ discard block |
||
152 | 152 | $body = $page_block_body; |
153 | 153 | foreach ($resources as $resource) { |
154 | 154 | $res_arr = explode('+', $resource); |
155 | - $res_slug = (string) $res_arr[0]; |
|
156 | - $res_json = (string) $res_arr[1]; |
|
155 | + $res_slug = (string)$res_arr[0]; |
|
156 | + $res_json = (string)$res_arr[1]; |
|
157 | 157 | $res_object = Resource::where('slug', $res_slug)->first(); |
158 | 158 | $json = $res_object->json[app()->getLocale()]; |
159 | 159 | $match = $json[$res_json]; |
160 | - $body = str_replace('['.$res_slug.'+'.$res_json.']', $match, $body); |
|
160 | + $body = str_replace('[' . $res_slug . '+' . $res_json . ']', $match, $body); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | return $body; |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $slug = $form_slug; |
169 | 169 | $form = Form::where('slug', $slug)->first(); |
170 | 170 | $render = View::make('chuckcms::backend.forms.render', ['form' => $form])->render(); |
171 | - $html = str_replace('[FORM='.$slug.']', $render, $page_block_body); |
|
171 | + $html = str_replace('[FORM=' . $slug . ']', $render, $page_block_body); |
|
172 | 172 | |
173 | 173 | return $html; |
174 | 174 | } |
@@ -179,12 +179,12 @@ discard block |
||
179 | 179 | if (strpos($repeater_slug, ' LIMIT=') !== false) { |
180 | 180 | $explode = explode(' LIMIT=', $repeater_slug); |
181 | 181 | $slug = $explode[0]; |
182 | - $limit = (int) $explode[1]; |
|
182 | + $limit = (int)$explode[1]; |
|
183 | 183 | $contents = Repeater::where('slug', $slug)->take($limit)->get(); |
184 | 184 | } else { |
185 | 185 | $contents = Repeater::where('slug', $slug)->get(); |
186 | 186 | } |
187 | - $resources = $this->getResources($page_block_body, '['.$slug.'+', ']'); |
|
187 | + $resources = $this->getResources($page_block_body, '[' . $slug . '+', ']'); |
|
188 | 188 | $new_body = []; |
189 | 189 | $i = 0; |
190 | 190 | foreach ($contents as $content) { |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | foreach ($resources as $resource) { |
193 | 193 | $json = $content->json; |
194 | 194 | $match = $json[$resource]; |
195 | - $body = str_replace('['.$slug.'+'.$resource.']', $match, $body); |
|
195 | + $body = str_replace('[' . $slug . '+' . $resource . ']', $match, $body); |
|
196 | 196 | } |
197 | 197 | $new_body[] = $body; |
198 | 198 | $i++; |
@@ -109,7 +109,7 @@ |
||
109 | 109 | $this->info('.. ..'); |
110 | 110 | $this->info('. .'); |
111 | 111 | $this->info(' '); |
112 | - $this->info('New super admin: '.$name.' ('.$email.') generated successfully'); |
|
112 | + $this->info('New super admin: ' . $name . ' (' . $email . ') generated successfully'); |
|
113 | 113 | $this->info(' '); |
114 | 114 | } |
115 | 115 | } |
@@ -121,7 +121,7 @@ |
||
121 | 121 | $this->info('.. ..'); |
122 | 122 | $this->info('. .'); |
123 | 123 | $this->info(' '); |
124 | - $this->info('New site: '.$name.' ('.$domain.') generated successfully'); |
|
124 | + $this->info('New site: ' . $name . ' (' . $domain . ') generated successfully'); |
|
125 | 125 | $this->info(' '); |
126 | 126 | } |
127 | 127 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('pages', function (Blueprint $table) { |
|
16 | + Schema::table('pages', function(Blueprint $table) { |
|
17 | 17 | $table->integer('order')->default(1)->after('page'); |
18 | 18 | }); |
19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down() |
27 | 27 | { |
28 | - Schema::table('pages', function (Blueprint $table) { |
|
28 | + Schema::table('pages', function(Blueprint $table) { |
|
29 | 29 | $table->dropColumn('order'); |
30 | 30 | }); |
31 | 31 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('roles', function (Blueprint $table) { |
|
16 | + Schema::table('roles', function(Blueprint $table) { |
|
17 | 17 | $table->string('redirect')->default('dashboard')->after('guard_name'); |
18 | 18 | }); |
19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down() |
27 | 27 | { |
28 | - Schema::table('roles', function (Blueprint $table) { |
|
28 | + Schema::table('roles', function(Blueprint $table) { |
|
29 | 29 | $table->dropColumn('redirect'); |
30 | 30 | }); |
31 | 31 | } |