@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | if ($this->confirm('Do you have setting the database configuration at .env ?')) { |
50 | 50 | |
51 | - if (! file_exists(public_path('vendor'))) { |
|
51 | + if (!file_exists(public_path('vendor'))) { |
|
52 | 52 | mkdir(public_path('vendor'), 0777); |
53 | 53 | } |
54 | 54 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $this->info('Migrating database...'); |
80 | 80 | $this->call('migrate'); |
81 | 81 | |
82 | - if (! class_exists('CBSeeder')) { |
|
82 | + if (!class_exists('CBSeeder')) { |
|
83 | 83 | require_once __DIR__.'/../database/seeds/CBSeeder.php'; |
84 | 84 | } |
85 | 85 | $this->call('db:seed', ['--class' => 'CBSeeder']); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | $this->info('Updating: '); |
39 | 39 | |
40 | - if (! file_exists(public_path('vendor'))) { |
|
40 | + if (!file_exists(public_path('vendor'))) { |
|
41 | 41 | mkdir(public_path('vendor'), 0777); |
42 | 42 | } |
43 | 43 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $this->info('Migrating database...'); |
69 | 69 | $this->call('migrate'); |
70 | 70 | |
71 | - if (! class_exists('CBSeeder')) { |
|
71 | + if (!class_exists('CBSeeder')) { |
|
72 | 72 | require_once __DIR__.'/../database/seeds/CBSeeder.php'; |
73 | 73 | } |
74 | 74 | $this->call('db:seed', ['--class' => 'CBSeeder']); |
@@ -9,7 +9,7 @@ |
||
9 | 9 | use Route; |
10 | 10 | use Validator; |
11 | 11 | |
12 | -class CB extends CRUDBooster { |
|
12 | +class CB extends CRUDBooster { |
|
13 | 13 | //This CB class is for alias of CRUDBooster class |
14 | 14 | |
15 | 15 |
@@ -9,29 +9,29 @@ discard block |
||
9 | 9 | | |
10 | 10 | */ |
11 | 11 | |
12 | -if(!function_exists('assetThumbnail')) { |
|
12 | +if (!function_exists('assetThumbnail')) { |
|
13 | 13 | function assetThumbnail($path) { |
14 | - $path = str_replace('uploads/','uploads_thumbnail/',$path); |
|
14 | + $path = str_replace('uploads/', 'uploads_thumbnail/', $path); |
|
15 | 15 | return asset($path); |
16 | 16 | } |
17 | 17 | } |
18 | 18 | |
19 | -if(!function_exists('assetResize')) { |
|
20 | - function assetResize($path,$width,$height=null,$quality=70) { |
|
19 | +if (!function_exists('assetResize')) { |
|
20 | + function assetResize($path, $width, $height = null, $quality = 70) { |
|
21 | 21 | $basename = basename($path); |
22 | 22 | $pathWithoutName = str_replace($basename, '', $path); |
23 | 23 | $newLocation = $pathWithoutName.'/w_'.$width.'_h_'.$height.'_'.$basename; |
24 | - if(Storage::exists($newLocation)) { |
|
24 | + if (Storage::exists($newLocation)) { |
|
25 | 25 | return asset($newLocation); |
26 | - }else{ |
|
27 | - $img = Image::make(storage_path($path))->fit($width,$height); |
|
28 | - $img->save(storage_path($newLocation),$quality); |
|
26 | + } else { |
|
27 | + $img = Image::make(storage_path($path))->fit($width, $height); |
|
28 | + $img->save(storage_path($newLocation), $quality); |
|
29 | 29 | return asset($newLocation); |
30 | 30 | } |
31 | 31 | } |
32 | 32 | } |
33 | 33 | |
34 | -if(!function_exists('extract_unit')) { |
|
34 | +if (!function_exists('extract_unit')) { |
|
35 | 35 | /* |
36 | 36 | Credits: Bit Repository |
37 | 37 | URL: http://www.bitrepository.com/extract-content-between-two-delimiters-with-php.html |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | -if(!function_exists('now')) { |
|
52 | +if (!function_exists('now')) { |
|
53 | 53 | function now() { |
54 | 54 | return date('Y-m-d H:i:s'); |
55 | 55 | } |
@@ -62,25 +62,25 @@ discard block |
||
62 | 62 | | $name = name of input |
63 | 63 | | |
64 | 64 | */ |
65 | -if(!function_exists('g')) { |
|
65 | +if (!function_exists('g')) { |
|
66 | 66 | function g($name) { |
67 | 67 | return Request::get($name); |
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
71 | -if(!function_exists('min_var_export')) { |
|
71 | +if (!function_exists('min_var_export')) { |
|
72 | 72 | function min_var_export($input) { |
73 | - if(is_array($input)) { |
|
73 | + if (is_array($input)) { |
|
74 | 74 | $buffer = []; |
75 | - foreach($input as $key => $value) |
|
75 | + foreach ($input as $key => $value) |
|
76 | 76 | $buffer[] = var_export($key, true)."=>".min_var_export($value); |
77 | - return "[".implode(",",$buffer)."]"; |
|
77 | + return "[".implode(",", $buffer)."]"; |
|
78 | 78 | } else |
79 | 79 | return var_export($input, true); |
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | -if(!function_exists('rrmdir')) { |
|
83 | +if (!function_exists('rrmdir')) { |
|
84 | 84 | /* |
85 | 85 | * http://stackoverflow.com/questions/3338123/how-do-i-recursively-delete-a-directory-and-its-entire-contents-files-sub-dir |
86 | 86 | */ |
@@ -19,25 +19,25 @@ discard block |
||
19 | 19 | { |
20 | 20 | |
21 | 21 | $this->loadViewsFrom(__DIR__.'/views', 'crudbooster'); |
22 | - $this->publishes([__DIR__.'/configs/crudbooster.php' => config_path('crudbooster.php')],'cb_config'); |
|
22 | + $this->publishes([__DIR__.'/configs/crudbooster.php' => config_path('crudbooster.php')], 'cb_config'); |
|
23 | 23 | $this->publishes([__DIR__.'/localization' => resource_path('lang')], 'cb_localization'); |
24 | - $this->publishes([__DIR__.'/database' => base_path('database')],'cb_migration'); |
|
24 | + $this->publishes([__DIR__.'/database' => base_path('database')], 'cb_migration'); |
|
25 | 25 | |
26 | 26 | $this->publishes([ |
27 | 27 | __DIR__.'/userfiles/views/vendor/crudbooster/type_components/readme.txt' => resource_path('views/vendor/crudbooster/type_components/readme.txt'), |
28 | - ],'cb_type_components'); |
|
28 | + ], 'cb_type_components'); |
|
29 | 29 | |
30 | - if(!file_exists(app_path('Http/Controllers/CBHook.php'))) { |
|
31 | - $this->publishes([__DIR__.'/userfiles/controllers/CBHook.php' => app_path('Http/Controllers/CBHook.php')],'CBHook'); |
|
30 | + if (!file_exists(app_path('Http/Controllers/CBHook.php'))) { |
|
31 | + $this->publishes([__DIR__.'/userfiles/controllers/CBHook.php' => app_path('Http/Controllers/CBHook.php')], 'CBHook'); |
|
32 | 32 | } |
33 | 33 | |
34 | - if(!file_exists(app_path('Http/Controllers/AdminCmsUsersController.php'))) { |
|
35 | - $this->publishes([__DIR__.'/userfiles/controllers/AdminCmsUsersController.php' => app_path('Http/Controllers/AdminCmsUsersController.php')],'cb_user_controller'); |
|
34 | + if (!file_exists(app_path('Http/Controllers/AdminCmsUsersController.php'))) { |
|
35 | + $this->publishes([__DIR__.'/userfiles/controllers/AdminCmsUsersController.php' => app_path('Http/Controllers/AdminCmsUsersController.php')], 'cb_user_controller'); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | $this->publishes([ |
39 | 39 | __DIR__.'/assets'=>public_path('vendor/crudbooster') |
40 | - ],'cb_asset'); |
|
40 | + ], 'cb_asset'); |
|
41 | 41 | |
42 | 42 | require __DIR__.'/validations/validation.php'; |
43 | 43 | require __DIR__.'/routes.php'; |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | { |
53 | 53 | require __DIR__.'/helpers/Helper.php'; |
54 | 54 | |
55 | - $this->mergeConfigFrom(__DIR__.'/configs/crudbooster.php','crudbooster'); |
|
55 | + $this->mergeConfigFrom(__DIR__.'/configs/crudbooster.php', 'crudbooster'); |
|
56 | 56 | |
57 | - $this->app->singleton('crudbooster', function () |
|
57 | + $this->app->singleton('crudbooster', function() |
|
58 | 58 | { |
59 | 59 | return true; |
60 | 60 | }); |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | |
85 | 85 | private function registerCrudboosterCommand() |
86 | 86 | { |
87 | - $this->app->singleton('crudboosterinstall',function() { |
|
87 | + $this->app->singleton('crudboosterinstall', function() { |
|
88 | 88 | return new CrudboosterInstallationCommand; |
89 | 89 | }); |
90 | 90 | |
91 | - $this->app->singleton('crudboosterupdate',function() { |
|
91 | + $this->app->singleton('crudboosterupdate', function() { |
|
92 | 92 | return new CrudboosterUpdateCommand; |
93 | 93 | }); |
94 | 94 | } |