@@ -7,7 +7,7 @@ |
||
7 | 7 | name="{{ $column->getName() }}" id="{{ $column->getName() }}"> |
8 | 8 | <option value="">** Select a {{ $column->getLabel() }}</option> |
9 | 9 | <?php |
10 | - $columnValue = old($column->getName())?:($column->getDefaultValue())?:$column->getValue(); |
|
10 | + $columnValue = old($column->getName()) ?: ($column->getDefaultValue()) ?: $column->getValue(); |
|
11 | 11 | ?> |
12 | 12 | @foreach($column->getOptions() as $key=>$value) |
13 | 13 | <option {{ $columnValue==$key?'selected':'' }} value="{{ $key }}">{{ $value }}</option> |
@@ -22,7 +22,7 @@ |
||
22 | 22 | public function indexRender($row, $column) |
23 | 23 | { |
24 | 24 | $value = trim(strip_tags($row->{ $column->getField() })); |
25 | - if($column->getLimit()) { |
|
25 | + if ($column->getLimit()) { |
|
26 | 26 | $value = Str::limit($value, $column->getLimit()); |
27 | 27 | } |
28 | 28 | return $value; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -cb()->routeGroupBackend(function () { |
|
4 | - cb()->routePost("upload-image",'\crocodicstudio\crudbooster\types\image\ImageController@postUploadImage'); |
|
3 | +cb()->routeGroupBackend(function() { |
|
4 | + cb()->routePost("upload-image", '\crocodicstudio\crudbooster\types\image\ImageController@postUploadImage'); |
|
5 | 5 | }); |
6 | 6 | \ No newline at end of file |
@@ -14,21 +14,21 @@ |
||
14 | 14 | { |
15 | 15 | public function postUploadImage() |
16 | 16 | { |
17 | - if(auth()->guest()) return redirect(cb()->getLoginUrl()); |
|
17 | + if (auth()->guest()) return redirect(cb()->getLoginUrl()); |
|
18 | 18 | |
19 | 19 | $file = null; |
20 | 20 | try { |
21 | 21 | |
22 | 22 | cb()->validation([ |
23 | - 'userfile' => 'required|mimes:' . implode(",",config('crudbooster.UPLOAD_IMAGE_EXTENSION_ALLOWED')) |
|
23 | + 'userfile' => 'required|mimes:'.implode(",", config('crudbooster.UPLOAD_IMAGE_EXTENSION_ALLOWED')) |
|
24 | 24 | ]); |
25 | 25 | |
26 | 26 | $file = cb()->uploadFile('userfile', true); |
27 | 27 | |
28 | 28 | } catch (CBValidationException $e) { |
29 | - return response()->json(['status'=>false,'message'=>$e->getMessage()]); |
|
29 | + return response()->json(['status'=>false, 'message'=>$e->getMessage()]); |
|
30 | 30 | } catch (\Exception $e) { |
31 | - return response()->json(['status'=>false,'message'=>$e->getMessage()]); |
|
31 | + return response()->json(['status'=>false, 'message'=>$e->getMessage()]); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | return response()->json([ |