@@ -18,7 +18,7 @@ |
||
18 | 18 | public function getIndex() { |
19 | 19 | $data = []; |
20 | 20 | $data['page_title'] = "Dashboard"; |
21 | - return view('crudbooster::dev_layouts.modules.dashboard',$data); |
|
21 | + return view('crudbooster::dev_layouts.modules.dashboard', $data); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function postSkipTutorial() |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | public function getIndex() { |
26 | 26 | $data = []; |
27 | - return view($this->view.".index",$data); |
|
27 | + return view($this->view.".index", $data); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function postSave() |
@@ -38,6 +38,6 @@ discard block |
||
38 | 38 | "MAIL_ENCRYPTION"=>request("MAIL_ENCRYPTION") |
39 | 39 | ]); |
40 | 40 | |
41 | - return cb()->redirectBack("Mail configuration has been updated!","success"); |
|
41 | + return cb()->redirectBack("Mail configuration has been updated!", "success"); |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | \ No newline at end of file |
@@ -19,25 +19,25 @@ |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | public function postLoginDeveloper() { |
22 | - try{ |
|
22 | + try { |
|
23 | 23 | cb()->validation([ |
24 | 24 | 'username'=>'required', |
25 | 25 | 'password'=>'required' |
26 | 26 | ]); |
27 | 27 | |
28 | - if(request('username') == getSetting('developer_username') |
|
28 | + if (request('username') == getSetting('developer_username') |
|
29 | 29 | && request('password') == getSetting("developer_password")) { |
30 | 30 | |
31 | 31 | session(['developer'=>getSetting('developer_username')]); |
32 | 32 | |
33 | 33 | return redirect(cb()->getDeveloperUrl()); |
34 | 34 | |
35 | - }else{ |
|
36 | - return cb()->redirectBack( cbLang("password_and_username_is_wrong")); |
|
35 | + } else { |
|
36 | + return cb()->redirectBack(cbLang("password_and_username_is_wrong")); |
|
37 | 37 | } |
38 | 38 | |
39 | - }catch (CBValidationException $e) { |
|
40 | - return cb()->redirect(cb()->getLoginUrl(),$e->getMessage(),'warning'); |
|
39 | + } catch (CBValidationException $e) { |
|
40 | + return cb()->redirect(cb()->getLoginUrl(), $e->getMessage(), 'warning'); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | public function headers(array $headers) { |
27 | 27 | $newHeaders = []; |
28 | - foreach($headers as $key=>$val) { |
|
28 | + foreach ($headers as $key=>$val) { |
|
29 | 29 | $newHeaders[] = $key.": ".$val; |
30 | 30 | } |
31 | 31 | $this->headers = $newHeaders; |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | $err = curl_error($ch); |
48 | 48 | curl_close($ch); |
49 | 49 | |
50 | - if($err) { |
|
50 | + if ($err) { |
|
51 | 51 | return $err; |
52 | - }else { |
|
52 | + } else { |
|
53 | 53 | return $response; |
54 | 54 | } |
55 | 55 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | if ($this->confirm('Do you have setting the database configuration at .env ?')) { |
41 | 41 | |
42 | - if (! file_exists(public_path('vendor')) ) { |
|
42 | + if (!file_exists(public_path('vendor'))) { |
|
43 | 43 | mkdir(public_path('vendor')); |
44 | 44 | } |
45 | 45 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | /* |
53 | 53 | * Create CBPlugins |
54 | 54 | */ |
55 | - if(!file_exists(app_path("CBPlugins"))) { |
|
55 | + if (!file_exists(app_path("CBPlugins"))) { |
|
56 | 56 | mkdir(app_path("CBPlugins")); |
57 | 57 | } |
58 | 58 | |
@@ -61,11 +61,11 @@ discard block |
||
61 | 61 | * We need it to change default laravel local filesystem from storage to public |
62 | 62 | * We won't use symlink because of a security issue in many server |
63 | 63 | */ |
64 | - if(!file_exists(public_path("storage"))) { |
|
64 | + if (!file_exists(public_path("storage"))) { |
|
65 | 65 | $this->info("Create storage directory on /public"); |
66 | 66 | mkdir(public_path("storage")); |
67 | - file_put_contents(public_path("storage/.gitignore"),"!.gitignore"); |
|
68 | - file_put_contents(public_path("storage/index.html")," "); |
|
67 | + file_put_contents(public_path("storage/.gitignore"), "!.gitignore"); |
|
68 | + file_put_contents(public_path("storage/index.html"), " "); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /* |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | * Disable php execution on /vendor/* |
75 | 75 | */ |
76 | 76 | $this->info("Tweak some security for your laravel"); |
77 | - file_put_contents(base_path(".htaccess"), "\n\n# Generated by CRUDBooster\nServerSignature Off\nIndexIgnore *\nRewriteRule ^(.*)/vendor/.*\.(php|rb|py)$ - [F,L,NC]\nRewriteRule ^vendor/.*\.(php|rb|py)$ - [F,L,NC]\n<FilesMatch \"^\.\">\nOrder allow,deny\nDeny from all\n</FilesMatch>",FILE_APPEND); |
|
78 | - file_put_contents(public_path(".htaccess"), "\n\n# Generated by CRUDBooster\nServerSignature Off\nIndexIgnore *\nRewriteRule ^(.*)/vendor/.*\.(php|rb|py)$ - [F,L,NC]\nRewriteRule ^vendor/.*\.(php|rb|py)$ - [F,L,NC]\n<FilesMatch \"^\.\">\nOrder allow,deny\nDeny from all\n</FilesMatch>",FILE_APPEND); |
|
77 | + file_put_contents(base_path(".htaccess"), "\n\n# Generated by CRUDBooster\nServerSignature Off\nIndexIgnore *\nRewriteRule ^(.*)/vendor/.*\.(php|rb|py)$ - [F,L,NC]\nRewriteRule ^vendor/.*\.(php|rb|py)$ - [F,L,NC]\n<FilesMatch \"^\.\">\nOrder allow,deny\nDeny from all\n</FilesMatch>", FILE_APPEND); |
|
78 | + file_put_contents(public_path(".htaccess"), "\n\n# Generated by CRUDBooster\nServerSignature Off\nIndexIgnore *\nRewriteRule ^(.*)/vendor/.*\.(php|rb|py)$ - [F,L,NC]\nRewriteRule ^vendor/.*\.(php|rb|py)$ - [F,L,NC]\n<FilesMatch \"^\.\">\nOrder allow,deny\nDeny from all\n</FilesMatch>", FILE_APPEND); |
|
79 | 79 | |
80 | 80 | |
81 | 81 | $this->info('Dumping the autoloaded files and reloading all new files...'); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $data['name'] = $name; |
26 | 26 | $data['label'] = $label; |
27 | 27 | $data['required'] = $required; |
28 | - $data['encrypt'] = isset($options['encrypt'])?$options['encrypt']:true; |
|
28 | + $data['encrypt'] = isset($options['encrypt']) ? $options['encrypt'] : true; |
|
29 | 29 | return view("crudbooster::html_helper.file_uploader.index", $data); |
30 | 30 | } |
31 | 31 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $data['name'] = $name; |
43 | 43 | $data['label'] = $label; |
44 | 44 | $data['required'] = $required; |
45 | - $data['encrypt'] = isset($options['encrypt'])?$options['encrypt']:true; |
|
45 | + $data['encrypt'] = isset($options['encrypt']) ? $options['encrypt'] : true; |
|
46 | 46 | @$data['resizeWidth'] = $options['resize_width']; |
47 | 47 | @$data['resizeHeight'] = $options['resize_height']; |
48 | 48 | return view("crudbooster::html_helper.image_uploader.index", $data); |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -cb()->routeGroupBackend(function () { |
|
4 | - cb()->routePost("upload-file",'\crocodicstudio\crudbooster\types\file\FileController@postUploadFile'); |
|
3 | +cb()->routeGroupBackend(function() { |
|
4 | + cb()->routePost("upload-file", '\crocodicstudio\crudbooster\types\file\FileController@postUploadFile'); |
|
5 | 5 | }); |
6 | 6 | |
7 | -cb()->routeGroupDeveloper(function () { |
|
8 | - cb()->routePost("upload-file",'\crocodicstudio\crudbooster\types\file\FileController@postUploadFile'); |
|
7 | +cb()->routeGroupDeveloper(function() { |
|
8 | + cb()->routePost("upload-file", '\crocodicstudio\crudbooster\types\file\FileController@postUploadFile'); |
|
9 | 9 | }); |
10 | 10 | \ No newline at end of file |
@@ -19,15 +19,15 @@ |
||
19 | 19 | try { |
20 | 20 | |
21 | 21 | cb()->validation([ |
22 | - 'userfile' => 'required|mimes:' . implode(",",config('crudbooster.UPLOAD_FILE_EXTENSION_ALLOWED')) |
|
22 | + 'userfile' => 'required|mimes:'.implode(",", config('crudbooster.UPLOAD_FILE_EXTENSION_ALLOWED')) |
|
23 | 23 | ]); |
24 | 24 | |
25 | 25 | $file = cb()->uploadFile('userfile', request("encrypt")); |
26 | 26 | |
27 | 27 | } catch (CBValidationException $e) { |
28 | - return response()->json(['status'=>false,'message'=>$e->getMessage()]); |
|
28 | + return response()->json(['status'=>false, 'message'=>$e->getMessage()]); |
|
29 | 29 | } catch (\Exception $e) { |
30 | - return response()->json(['status'=>false,'message'=>$e->getMessage()]); |
|
30 | + return response()->json(['status'=>false, 'message'=>$e->getMessage()]); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | return response()->json([ |
@@ -18,15 +18,15 @@ |
||
18 | 18 | try { |
19 | 19 | |
20 | 20 | cb()->validation([ |
21 | - 'userfile' => 'required|mimes:' . implode(",",config('crudbooster.UPLOAD_IMAGE_EXTENSION_ALLOWED')) |
|
21 | + 'userfile' => 'required|mimes:'.implode(",", config('crudbooster.UPLOAD_IMAGE_EXTENSION_ALLOWED')) |
|
22 | 22 | ]); |
23 | 23 | |
24 | - $file = cb()->uploadFile('userfile', request("encrypt")?true:false, request("resize_width"), request("resize_height")); |
|
24 | + $file = cb()->uploadFile('userfile', request("encrypt") ?true:false, request("resize_width"), request("resize_height")); |
|
25 | 25 | |
26 | 26 | } catch (CBValidationException $e) { |
27 | - return response()->json(['status'=>false,'message'=>$e->getMessage()]); |
|
27 | + return response()->json(['status'=>false, 'message'=>$e->getMessage()]); |
|
28 | 28 | } catch (\Exception $e) { |
29 | - return response()->json(['status'=>false,'message'=>$e->getMessage()]); |
|
29 | + return response()->json(['status'=>false, 'message'=>$e->getMessage()]); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | return response()->json([ |