@@ -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; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public function assignment($value, $column) |
22 | 22 | { |
23 | - return @implode(";", request( $column->getName() )); |
|
23 | + return @implode(";", request($column->getName())); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -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,7 +14,9 @@ |
||
14 | 14 | { |
15 | 15 | public function postUploadImage() |
16 | 16 | { |
17 | - if(auth()->guest()) return redirect(cb()->getLoginUrl()); |
|
17 | + if(auth()->guest()) { |
|
18 | + return redirect(cb()->getLoginUrl()); |
|
19 | + } |
|
18 | 20 | |
19 | 21 | $file = null; |
20 | 22 | try { |
@@ -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 | - $file = cb()->uploadFile('userfile', request("encrypt")?true:false, request("resize_width"), request("resize_height")); |
|
26 | + $file = cb()->uploadFile('userfile', request("encrypt") ?true:false, request("resize_width"), request("resize_height")); |
|
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([ |
@@ -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; |
@@ -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; |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | $foreignValue = request('foreign_value'); |
19 | 19 | $table = decrypt(request('table')); |
20 | 20 | $sqlCondition = decrypt(request('sql_condition')); |
21 | - if($foreignKey && $foreignValue && $table) { |
|
21 | + if ($foreignKey && $foreignValue && $table) { |
|
22 | 22 | |
23 | 23 | $data = DB::table($table) |
24 | 24 | ->where($foreignKey, $foreignValue); |
25 | - if($sqlCondition) { |
|
25 | + if ($sqlCondition) { |
|
26 | 26 | $data->whereRaw($sqlCondition); |
27 | 27 | } |
28 | 28 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | return response()->json(['status'=>true, 'data'=>$data]); |
32 | 32 | |
33 | - }else{ |
|
33 | + } else { |
|
34 | 34 | return response()->json(['status'=>false]); |
35 | 35 | } |
36 | 36 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | return response()->json(['status'=>true, 'data'=>$data]); |
32 | 32 | |
33 | - }else{ |
|
33 | + } else{ |
|
34 | 34 | return response()->json(['status'=>false]); |
35 | 35 | } |
36 | 36 | } |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -cb()->routeGroupBackend(function () { |
|
4 | - cb()->routePost("select-lookup",'\crocodicstudio\crudbooster\types\select\SelectController@postLookup'); |
|
3 | +cb()->routeGroupBackend(function() { |
|
4 | + cb()->routePost("select-lookup", '\crocodicstudio\crudbooster\types\select\SelectController@postLookup'); |
|
5 | 5 | }); |
6 | 6 | \ No newline at end of file |
@@ -8,7 +8,7 @@ |
||
8 | 8 | <option value="">** Select a {{ $column->getLabel() }}</option> |
9 | 9 | @if(!$column->getForeignKey()) |
10 | 10 | <?php |
11 | - $columnValue = old($column->getName())?:($column->getDefaultValue())?:$column->getValue(); |
|
11 | + $columnValue = old($column->getName()) ?: ($column->getDefaultValue()) ?: $column->getValue(); |
|
12 | 12 | ?> |
13 | 13 | @foreach($column->getOptions() as $key=>$value) |
14 | 14 | <option {{ $columnValue==$key?'selected':'' }} value="{{ $key }}">{{ $value }}</option> |