@@ -45,31 +45,31 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
47 | 47 | */ |
48 | - public function list($asset,Request $request){ |
|
48 | + public function list($asset, Request $request){ |
|
49 | 49 | |
50 | 50 | $assetData = Helpers::parseAssetType($asset); |
51 | 51 | |
52 | 52 | return view('phpsa-datastore::backend.ams.list') |
53 | 53 | ->withAsset($assetData) |
54 | 54 | ->withAssetType($asset) |
55 | - ->withContent($this->datastoreRepository->paginateAssets($assetData, 25, 'page' )); |
|
55 | + ->withContent($this->datastoreRepository->paginateAssets($assetData, 25, 'page')); |
|
56 | 56 | |
57 | 57 | } |
58 | 58 | |
59 | - public function inject(Request $request){ |
|
59 | + public function inject(Request $request) { |
|
60 | 60 | $assetData = Helpers::parseAssetType($request->input('asset'), true); |
61 | 61 | $newAsset = Datastore::getAsset($assetData); |
62 | 62 | return response($newAsset->injectForm($request->input('idx'))); |
63 | 63 | } |
64 | 64 | |
65 | 65 | |
66 | - protected function _getKids($asset){ |
|
66 | + protected function _getKids($asset) { |
|
67 | 67 | $children = []; |
68 | - if ( ! empty($asset->children)) |
|
68 | + if (!empty($asset->children)) |
|
69 | 69 | { |
70 | - $children = Helpers::assetInfo($asset->children); |
|
71 | - $children['classname'] = $asset->children; |
|
72 | - $children['path'] = Helpers::getPath($asset->children); |
|
70 | + $children = Helpers::assetInfo($asset->children); |
|
71 | + $children['classname'] = $asset->children; |
|
72 | + $children['path'] = Helpers::getPath($asset->children); |
|
73 | 73 | |
74 | 74 | $kids = $asset->children(); |
75 | 75 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | return $children; |
84 | 84 | } |
85 | 85 | |
86 | - protected function _getParents($asset){ |
|
86 | + protected function _getParents($asset) { |
|
87 | 87 | |
88 | 88 | $type = str_replace('\\', "\\\\", $asset->type); |
89 | 89 | $parentAssets = $this->datastoreRepository->where('accept', '%' . $type . '%', 'like')->distinct()->get(['type', 'name', 'accept_limit'])->toArray(); |
@@ -118,19 +118,19 @@ discard block |
||
118 | 118 | return $parentAssets; |
119 | 119 | } |
120 | 120 | |
121 | - protected function _getPageData($asset){ |
|
122 | - return ($asset->is_child || !$asset->id )? null : DatastorePages::where('asset', $asset->id)->first(); |
|
121 | + protected function _getPageData($asset) { |
|
122 | + return ($asset->is_child || !$asset->id) ? null : DatastorePages::where('asset', $asset->id)->first(); |
|
123 | 123 | } |
124 | 124 | |
125 | - public function create($assetType, Request $request){ |
|
125 | + public function create($assetType, Request $request) { |
|
126 | 126 | |
127 | 127 | |
128 | 128 | $assetData = Helpers::parseAssetType($assetType, true); |
129 | 129 | $newAsset = Datastore::getAsset($assetData); |
130 | 130 | |
131 | - if($newAsset->max_instances > 0){ |
|
131 | + if ($newAsset->max_instances > 0) { |
|
132 | 132 | $count = DatastoreModel::where('type', $assetData)->count(); |
133 | - if($count >= $newAsset->max_instances){ |
|
133 | + if ($count >= $newAsset->max_instances) { |
|
134 | 134 | return redirect()->route('admin.ams.content.list', $assetType)->withFlashDanger("You can only create " . $newAsset->max_instances . " instances of this Asset"); |
135 | 135 | } |
136 | 136 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | ->withPageData($pageData); |
148 | 148 | } |
149 | 149 | |
150 | - public function edit($assetType, $id){ |
|
150 | + public function edit($assetType, $id) { |
|
151 | 151 | |
152 | 152 | $asset = Datastore::getAssetById($id); |
153 | 153 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | ->withPageData($pageData); |
164 | 164 | } |
165 | 165 | |
166 | - public function save($assetType , Request $request){ |
|
166 | + public function save($assetType, Request $request) { |
|
167 | 167 | |
168 | 168 | |
169 | 169 | $assetData = Helpers::parseAssetType($assetType, true); |
@@ -175,8 +175,8 @@ discard block |
||
175 | 175 | unset($form['assetRemove']); |
176 | 176 | |
177 | 177 | |
178 | - $form_valid = $newAsset->validate($form); |
|
179 | - if(!$form_valid){ |
|
178 | + $form_valid = $newAsset->validate($form); |
|
179 | + if (!$form_valid) { |
|
180 | 180 | die("@TODO STILL"); |
181 | 181 | } |
182 | 182 | |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | } |
276 | 276 | } |
277 | 277 | |
278 | - if(!empty($form['page_title']) && !empty($form['page_slug'])){ |
|
278 | + if (!empty($form['page_title']) && !empty($form['page_slug'])) { |
|
279 | 279 | $pageData = DatastorePages::firstOrNew(['asset' => $id]); |
280 | 280 | $pageData->title = $form['page_title']; |
281 | 281 | $pageData->slug = $form['page_slug']; |
@@ -289,9 +289,9 @@ discard block |
||
289 | 289 | } |
290 | 290 | |
291 | 291 | |
292 | - public function destroy($id, Request $request){ |
|
292 | + public function destroy($id, Request $request) { |
|
293 | 293 | $asset = DatastoreModel::findOrFail($id); |
294 | - if(!$asset || $asset->namespace !== 'asset'){ |
|
294 | + if (!$asset || $asset->namespace !== 'asset') { |
|
295 | 295 | throw new GeneralException("NOT FOUND"); |
296 | 296 | } |
297 | 297 | $path = $asset->content_path; |
@@ -306,24 +306,24 @@ discard block |
||
306 | 306 | { |
307 | 307 | DB::enableQueryLog(); |
308 | 308 | |
309 | - $slug = $request->input('page_slug'); |
|
310 | - $id = (int)$request->input('id'); |
|
309 | + $slug = $request->input('page_slug'); |
|
310 | + $id = (int) $request->input('id'); |
|
311 | 311 | $generate = $request->input('generate'); |
312 | 312 | |
313 | 313 | |
314 | - if($generate){ |
|
314 | + if ($generate) { |
|
315 | 315 | $slug = Str::slug($slug); |
316 | 316 | } |
317 | 317 | |
318 | 318 | $exists = DatastorePages::where('slug', $slug)->where('asset', '!=', $id)->exists(); |
319 | 319 | |
320 | - if($generate){ |
|
320 | + if ($generate) { |
|
321 | 321 | return response()->json([ |
322 | 322 | 'slug' => $slug, |
323 | 323 | 'available' => $exists ? 0 : 1 |
324 | 324 | ]); |
325 | 325 | } |
326 | - return response()->json($exists ? "Slug already in use": true); |
|
326 | + return response()->json($exists ? "Slug already in use" : true); |
|
327 | 327 | |
328 | 328 | |
329 | 329 | } |
@@ -333,10 +333,10 @@ discard block |
||
333 | 333 | 'file' => 'required' |
334 | 334 | ]); |
335 | 335 | |
336 | - $originalFile= $request->file('file'); |
|
336 | + $originalFile = $request->file('file'); |
|
337 | 337 | |
338 | 338 | $t = time(); |
339 | - $filename = Str::slug($t.$originalFile->getClientOriginalName(),"."); |
|
339 | + $filename = Str::slug($t . $originalFile->getClientOriginalName(), "."); |
|
340 | 340 | |
341 | 341 | $path = $request->file('file')->storeAs( |
342 | 342 | 'public', $filename |
@@ -350,26 +350,26 @@ discard block |
||
350 | 350 | 'file' => 'image|required|mimes:jpeg,png,jpg,gif,svg' |
351 | 351 | ]); |
352 | 352 | |
353 | - $originalImage= $request->file('file'); |
|
353 | + $originalImage = $request->file('file'); |
|
354 | 354 | |
355 | 355 | $t = time(); |
356 | - $filename = Str::slug($t.$originalImage->getClientOriginalName(),"."); |
|
356 | + $filename = Str::slug($t . $originalImage->getClientOriginalName(), "."); |
|
357 | 357 | |
358 | 358 | |
359 | - if(!is_dir(public_path().'/vendor/phpsa-datastore/thumbs')){ |
|
360 | - mkdir(public_path().'/vendor/phpsa-datastore/thumbs', 0755, true); |
|
359 | + if (!is_dir(public_path() . '/vendor/phpsa-datastore/thumbs')) { |
|
360 | + mkdir(public_path() . '/vendor/phpsa-datastore/thumbs', 0755, true); |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | |
364 | 364 | $thumbnailImage = Image::make($originalImage); |
365 | - $thumbnailPath = public_path().'/vendor/phpsa-datastore/img/'; |
|
366 | - $originalPath = public_path().'/vendor/phpsa-datastore/thumbs/'; |
|
367 | - $thumbnailImage->save($originalPath.$filename); |
|
365 | + $thumbnailPath = public_path() . '/vendor/phpsa-datastore/img/'; |
|
366 | + $originalPath = public_path() . '/vendor/phpsa-datastore/thumbs/'; |
|
367 | + $thumbnailImage->save($originalPath . $filename); |
|
368 | 368 | |
369 | - $thumbnailImage->resize(150,150, function ($constraint) { |
|
369 | + $thumbnailImage->resize(150, 150, function($constraint) { |
|
370 | 370 | $constraint->aspectRatio(); |
371 | 371 | }); |
372 | - $thumbnailImage->save($thumbnailPath.$filename); |
|
372 | + $thumbnailImage->save($thumbnailPath . $filename); |
|
373 | 373 | |
374 | 374 | |
375 | 375 | return response()->json(["file" => $filename]); |
@@ -377,14 +377,14 @@ discard block |
||
377 | 377 | |
378 | 378 | |
379 | 379 | |
380 | - public function indentityAutocomplete(Request $request){ |
|
380 | + public function indentityAutocomplete(Request $request) { |
|
381 | 381 | $search = urldecode($request->input('q')); |
382 | 382 | $results = []; |
383 | - if( strlen($search) >= 3 ) |
|
383 | + if (strlen($search) >= 3) |
|
384 | 384 | { |
385 | 385 | $userModel = config('auth.providers.users.model'); |
386 | - $records = $userModel::whereRaw("concat_ws(' ', first_name, last_name) like ? ", ["{$search}%"])->limit(10)->get(['id','first_name','last_name']); |
|
387 | - foreach($records as $record) |
|
386 | + $records = $userModel::whereRaw("concat_ws(' ', first_name, last_name) like ? ", ["{$search}%"])->limit(10)->get(['id', 'first_name', 'last_name']); |
|
387 | + foreach ($records as $record) |
|
388 | 388 | { |
389 | 389 | $result = [ |
390 | 390 | 'value' => $record->id, |
@@ -434,13 +434,13 @@ discard block |
||
434 | 434 | } |
435 | 435 | |
436 | 436 | |
437 | - $query = DatastoreModel::where('value','like','%' . $term . '%') |
|
437 | + $query = DatastoreModel::where('value', 'like', '%' . $term . '%') |
|
438 | 438 | ->where('type', $type); |
439 | - if($q == 'fieldset'){ |
|
439 | + if ($q == 'fieldset') { |
|
440 | 440 | $query->order_by('value'); |
441 | 441 | } |
442 | 442 | $data = $query->get(['value as label', 'id as value']); |
443 | - return response()->json($data ); |
|
443 | + return response()->json($data); |
|
444 | 444 | /* |
445 | 445 | //db query |
446 | 446 | if ($q == 'fieldset') { |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | echo json_encode($data); |
456 | 456 | exit;*/ |
457 | 457 | } |
458 | - return response()->json( []); |
|
458 | + return response()->json([]); |
|
459 | 459 | } |
460 | 460 | |
461 | 461 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | $prefix = config("datastore.urlprefix"); |
12 | 12 | |
13 | -Route::group(['namespace' => 'Backend', 'prefix' => 'admin', 'as' => 'admin.ams.', 'middleware' => ['admin', 'permission:manage datastore']], function () { |
|
13 | +Route::group(['namespace' => 'Backend', 'prefix' => 'admin', 'as' => 'admin.ams.', 'middleware' => ['admin', 'permission:manage datastore']], function() { |
|
14 | 14 | Route::get('ams/slug', [AdminController::class, 'slug'])->name('content.slug'); |
15 | 15 | Route::post('ams/file', [AdminController::class, 'file'])->name('content.file'); |
16 | 16 | Route::post('ams/image', [AdminController::class, 'image'])->name('content.image'); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | Route::get('/ams/gettypedata', [AdminController::class, 'getTypeData'])->name('content.test.typedata'); |
27 | 27 | }); |
28 | 28 | |
29 | -Route::group(['namespace' => 'Frontend', 'as' => 'frontend.ams.', 'prefix' => $prefix ], function () { |
|
29 | +Route::group(['namespace' => 'Frontend', 'as' => 'frontend.ams.', 'prefix' => $prefix], function() { |
|
30 | 30 | Route::get('{slug}', [DatastoreController::class, 'page'])->name('page.slug'); |
31 | 31 | Route::get('articles/author/{id}-{slug}', [DatastoreController::class, 'articleByAuthor'])->name('article.byauthor'); |
32 | 32 | Route::get('articles/{slug}', [DatastoreController::class, 'page'])->name('article.category'); |
@@ -1,17 +1,17 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -Breadcrumbs::for('admin.ams.content.list', function ($trail, $asset) { |
|
3 | +Breadcrumbs::for ('admin.ams.content.list', function($trail, $asset) { |
|
4 | 4 | $trail->parent('admin.dashboard'); |
5 | 5 | $trail->push(__('phpsa-datastore::backend.menus.sidebar.main'), route('admin.ams.content.list', $asset)); |
6 | 6 | }); |
7 | 7 | |
8 | -Breadcrumbs::for('admin.ams.content.create', function ($trail, $asset) { |
|
8 | +Breadcrumbs::for ('admin.ams.content.create', function($trail, $asset) { |
|
9 | 9 | $trail->parent('admin.dashboard'); |
10 | 10 | $trail->push(__('phpsa-datastore::backend.menus.sidebar.main'), route('admin.ams.content.list', $asset)); |
11 | 11 | $trail->push(__('phpsa-datastore::backend.menus.sidebar.create')); |
12 | 12 | }); |
13 | 13 | |
14 | -Breadcrumbs::for('admin.ams.content.update', function ($trail, $asset) { |
|
14 | +Breadcrumbs::for ('admin.ams.content.update', function($trail, $asset) { |
|
15 | 15 | $trail->parent('admin.dashboard'); |
16 | 16 | $trail->push(__('phpsa-datastore::backend.menus.sidebar.main'), route('admin.ams.content.list', $asset)); |
17 | 17 | $trail->push(__('phpsa-datastore::backend.menus.sidebar.update')); |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php |
2 | - $src = $params['assetClass']::getImageUrl($value, !empty($params['width']) ? $params['width']: null,!empty($params['height']) ? $params['height']: null); |
|
2 | + $src = $params['assetClass']::getImageUrl($value, !empty($params['width']) ? $params['width'] : null, !empty($params['height']) ? $params['height'] : null); |
|
3 | 3 | $image = html()->img()->src($src); |
4 | - foreach(['id','class','onError','alt','title'] as $prop){ |
|
5 | - if(!empty($params[$prop])){ |
|
4 | + foreach (['id', 'class', 'onError', 'alt', 'title'] as $prop) { |
|
5 | + if (!empty($params[$prop])) { |
|
6 | 6 | $image = $image->attribute($prop, $params[$prop]); |
7 | 7 | } |
8 | 8 | } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | @foreach ($datastoreData as $ksk => $dsa) |
27 | 27 | <?php |
28 | - $link = strtolower($datastoreKey ? $datastoreKey .'.' . $ksk : $ksk); |
|
28 | + $link = strtolower($datastoreKey ? $datastoreKey . '.' . $ksk : $ksk); |
|
29 | 29 | $route = 'admin.ams.content.list'; |
30 | 30 | |
31 | 31 | ?> |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | <?php if ($children): ?> |
38 | 38 | |
39 | 39 | <li class="nav-item "> |
40 | - <a class="nav-link" id="{{ Str::slug($children['path']) }}-child-tab" data-toggle="tab" href="#{{ Str::slug($children['path']) }}-child" role="tab" aria-controls="<?php echo Str::slug($children['path']) ; ?>-child" aria-selected="false">{{ $children['name'] }}</a> |
|
40 | + <a class="nav-link" id="{{ Str::slug($children['path']) }}-child-tab" data-toggle="tab" href="#{{ Str::slug($children['path']) }}-child" role="tab" aria-controls="<?php echo Str::slug($children['path']); ?>-child" aria-selected="false">{{ $children['name'] }}</a> |
|
41 | 41 | </li> |
42 | 42 | |
43 | 43 | <?php endif; ?> |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | <li class="nav-item"> |
48 | 48 | <a class="nav-link" id="seo-tab" data-toggle="tab" href="#seo" role="tab" aria-controls="seo" aria-selected="false">@lang('phpsa-datastore::backend.labels.tabs.seo')</a> |
49 | 49 | </li> |
50 | - <?php endif ;?> |
|
51 | - <?php if($asset->hasDeveloperForm()) :?> |
|
50 | + <?php endif; ?> |
|
51 | + <?php if ($asset->hasDeveloperForm()) :?> |
|
52 | 52 | <li class="nav-item"> |
53 | 53 | <a class="nav-link" id="cssjs-tab" data-toggle="tab" href="#cssjs" role="tab" aria-controls="cssjs" aria-selected="false">@lang('phpsa-datastore::backend.labels.tabs.cssjs')</a> |
54 | 54 | </li> |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | <?php foreach ($parent['related'] as $k => $v): ?> |
83 | 83 | |
84 | 84 | <div class="form-check form-check-inline mr-3"> |
85 | - <input class="form-check-input" id="parent_{{ $pid }}_{{ $k }}" type="<?php echo ((int)$v['accept_limit'] === 1 ? 'radio' : 'checkbox'); ?>" name="related_assets[]" value="<?php echo $v['id']; ?>" <?php echo (isset($v['assigned_and_found']) && $v['assigned_and_found']) ? ' checked="checked"' : ''; ?>/> |
|
85 | + <input class="form-check-input" id="parent_{{ $pid }}_{{ $k }}" type="<?php echo ((int) $v['accept_limit'] === 1 ? 'radio' : 'checkbox'); ?>" name="related_assets[]" value="<?php echo $v['id']; ?>" <?php echo (isset($v['assigned_and_found']) && $v['assigned_and_found']) ? ' checked="checked"' : ''; ?>/> |
|
86 | 86 | <input name="related_id[]" type="hidden" value="<?php echo $v['id']; ?>" /> |
87 | 87 | <label class="form-check-label" for="parent_{{ $pid }}_{{ $k }}"><?php echo $v['value']; ?></label> |
88 | 88 | </div> |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | <div class="tab-content tab-validate border-0" id="v-pills-tabContent"> |
130 | 130 | <?php foreach ($children['kids'] as $idx => $child): ?> |
131 | - <div class="child-tab-pane tab-pane fade<?php echo $idx == 0 ? ' show active' : '';?>" id="v-pills-{{ $idx }}" role="tabpanel" aria-labelledby="v-{{ $idx }}-home-tab"> |
|
131 | + <div class="child-tab-pane tab-pane fade<?php echo $idx == 0 ? ' show active' : ''; ?>" id="v-pills-{{ $idx }}" role="tabpanel" aria-labelledby="v-{{ $idx }}-home-tab"> |
|
132 | 132 | <fieldset> |
133 | 133 | <h6><span><?php echo ucwords($children['name']) . ' ' . ($idx + 1); ?></span> |
134 | 134 | <div class="btn-toolbar float-right" role="toolbar" aria-label="@lang('labels.general.toolbar_btn_groups')"> |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | </div> |
145 | 145 | </fieldset> |
146 | 146 | </div> |
147 | - <?php endforeach ;?> |
|
147 | + <?php endforeach; ?> |
|
148 | 148 | |
149 | 149 | </div> |
150 | 150 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | </div> |
216 | 216 | |
217 | 217 | <?php endif; ?> |
218 | - <?php if($asset->hasDeveloperForm()) :?> |
|
218 | + <?php if ($asset->hasDeveloperForm()) :?> |
|
219 | 219 | <div class="tab-pane fade" id="cssjs" role="tabpanel" aria-labelledby="cssjs-tab"> |
220 | 220 | <fieldset> |
221 | 221 | <h6>@lang('phpsa-datastore::backend.labels.tabs.cssjs')<small> - @lang('phpsa-datastore::backend.labels.tabs.label.createmodifycssjs')</small></h6> |
@@ -16,11 +16,11 @@ |
||
16 | 16 | </div><!--col--> |
17 | 17 | |
18 | 18 | <div class="col-sm-7"> |
19 | - <?php if($asset['max_instances'] == 0 || $content->total() < $asset['max_instances']): ?> |
|
19 | + <?php if ($asset['max_instances'] == 0 || $content->total() < $asset['max_instances']): ?> |
|
20 | 20 | @include('phpsa-datastore::backend.ams.includes.header-buttons') |
21 | 21 | <?php endif; ?> |
22 | 22 | </div><!--col--> |
23 | - <?php if($asset['about']): ?> |
|
23 | + <?php if ($asset['about']): ?> |
|
24 | 24 | <div class="col-sm-11"> |
25 | 25 | <div class="alert alert-info">{{ $asset['about'] }}</div> |
26 | 26 | </div> |
@@ -9,15 +9,15 @@ |
||
9 | 9 | ->attribute('cols', 40) |
10 | 10 | ->attribute('id', $data['key']) |
11 | 11 | ->class('form-control ams-htmleditor'); |
12 | - if($data['required']){ |
|
12 | + if ($data['required']) { |
|
13 | 13 | $input = $input->required(); |
14 | 14 | } |
15 | - if($asset_classname){ |
|
15 | + if ($asset_classname) { |
|
16 | 16 | $name = 'assetInjectionform[' . $asset_classname . '][' . $data['unique_id'] . '][' . $data['key'] . ']'; |
17 | - }else{ |
|
17 | + }else { |
|
18 | 18 | $name = $data['key']; |
19 | 19 | } |
20 | - $name .= (isset($multiform) && $multiform) ? '[]' : '';?> |
|
20 | + $name .= (isset($multiform) && $multiform) ? '[]' : ''; ?> |
|
21 | 21 | |
22 | 22 | {{ $input->name($name)->value(old($name, !empty($data['value']) ? $data['value'] : NULL)) }} |
23 | 23 |
@@ -1,11 +1,11 @@ discard block |
||
1 | 1 | <div class="row form-group"> |
2 | - <?php $key = isset($data['unique_id']) ? $data['key'] . '_' . $data['unique_id'] : $data['key'] ; ?> |
|
2 | + <?php $key = isset($data['unique_id']) ? $data['key'] . '_' . $data['unique_id'] : $data['key']; ?> |
|
3 | 3 | {{ html()->label($data['name'])->class('col-md-2 form-control-label')->for($key) }} |
4 | 4 | <div class="col-md-10"> |
5 | 5 | <?php |
6 | - if($asset_classname){ |
|
6 | + if ($asset_classname) { |
|
7 | 7 | $name = 'assetInjectionform[' . $asset_classname . '][' . $data['unique_id'] . '][' . $data['key'] . ']'; |
8 | - }else{ |
|
8 | + }else { |
|
9 | 9 | $name = $data['key']; |
10 | 10 | } |
11 | 11 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | ->attribute('id', $key . '_file') |
32 | 32 | ->placeholder('Choose File') |
33 | 33 | ->class('form-control ams-upload-filename'); |
34 | - if($data['required']){ |
|
34 | + if ($data['required']) { |
|
35 | 35 | $input = $input->required(); |
36 | 36 | } |
37 | 37 | ?> |