@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | 'skin-black', |
62 | 62 | 'skin-black-light' |
63 | 63 | ); |
64 | - foreach($skins as $skin): |
|
64 | + foreach ($skins as $skin): |
|
65 | 65 | ?> |
66 | 66 | <option <?=(@$row->theme_color == $skin) ? "selected" : ""?> value='<?=$skin?>'><?=ucwords(str_replace('-', ' ', $skin))?></option> |
67 | - <?php endforeach;?> |
|
67 | + <?php endforeach; ?> |
|
68 | 68 | </select> |
69 | 69 | <div class="text-danger">{{ $errors->first('theme_color') }}</div> |
70 | 70 | @push('bottom') |
@@ -151,13 +151,13 @@ discard block |
||
151 | 151 | </tr> |
152 | 152 | </thead> |
153 | 153 | <tbody> |
154 | - <?php $no = 1;?> |
|
154 | + <?php $no = 1; ?> |
|
155 | 155 | @foreach($moduls as $modul) |
156 | 156 | <?php |
157 | 157 | $roles = DB::table('cms_privileges_roles')->where('id_cms_moduls', $modul->id)->where('id_cms_privileges', $row->id)->first(); |
158 | 158 | ?> |
159 | 159 | <tr> |
160 | - <td><?php echo $no++;?></td> |
|
160 | + <td><?php echo $no++; ?></td> |
|
161 | 161 | <td>{{$modul->name}}</td> |
162 | 162 | <td class='info' align="center"><input type='checkbox' title='Check All Horizontal' |
163 | 163 | <?=($roles->is_create && $roles->is_read && $roles->is_edit && $roles->is_delete) ? "checked" : ""?> class='select_horizontal'/> |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | foreach ($columns as $col) { |
9 | 9 | |
10 | 10 | if (Request::get('columns')) { |
11 | - if (! in_array($col['name'], Request::get('columns'))) { |
|
11 | + if (!in_array($col['name'], Request::get('columns'))) { |
|
12 | 12 | continue; |
13 | 13 | } |
14 | 14 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | foreach ($columns as $col) { |
31 | 31 | |
32 | 32 | if (Request::get('columns')) { |
33 | - if (! in_array($col['name'], Request::get('columns'))) { |
|
33 | + if (!in_array($col['name'], Request::get('columns'))) { |
|
34 | 34 | continue; |
35 | 35 | } |
36 | 36 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | if (Request::input('fileformat') == 'pdf') { |
68 | - if (! empty($col['callback_php'])) { |
|
68 | + if (!empty($col['callback_php'])) { |
|
69 | 69 | |
70 | 70 | foreach ($row as $k => $v) { |
71 | 71 | $col['callback_php'] = str_replace("[".$k."]", $v, $col['callback_php']); |
@@ -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']); |
@@ -10,7 +10,7 @@ |
||
10 | 10 | use Validator; |
11 | 11 | |
12 | 12 | class CB extends CRUDBooster { |
13 | - //This CB class is for alias of CRUDBooster class |
|
13 | + //This CB class is for alias of CRUDBooster class |
|
14 | 14 | |
15 | 15 | |
16 | 16 | //alias of echoSelect2Mult |
@@ -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 |
@@ -10,49 +10,49 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | if(!function_exists('assetThumbnail')) { |
13 | - function assetThumbnail($path) { |
|
14 | - $path = str_replace('uploads/','uploads_thumbnail/',$path); |
|
15 | - return asset($path); |
|
16 | - } |
|
13 | + function assetThumbnail($path) { |
|
14 | + $path = str_replace('uploads/','uploads_thumbnail/',$path); |
|
15 | + return asset($path); |
|
16 | + } |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | if(!function_exists('assetResize')) { |
20 | - function assetResize($path,$width,$height=null,$quality=70) { |
|
21 | - $basename = basename($path); |
|
22 | - $pathWithoutName = str_replace($basename, '', $path); |
|
23 | - $newLocation = $pathWithoutName.'/w_'.$width.'_h_'.$height.'_'.$basename; |
|
24 | - if(Storage::exists($newLocation)) { |
|
25 | - return asset($newLocation); |
|
26 | - }else{ |
|
27 | - $img = Image::make(storage_path($path))->fit($width,$height); |
|
28 | - $img->save(storage_path($newLocation),$quality); |
|
29 | - return asset($newLocation); |
|
30 | - } |
|
31 | - } |
|
20 | + function assetResize($path,$width,$height=null,$quality=70) { |
|
21 | + $basename = basename($path); |
|
22 | + $pathWithoutName = str_replace($basename, '', $path); |
|
23 | + $newLocation = $pathWithoutName.'/w_'.$width.'_h_'.$height.'_'.$basename; |
|
24 | + if(Storage::exists($newLocation)) { |
|
25 | + return asset($newLocation); |
|
26 | + }else{ |
|
27 | + $img = Image::make(storage_path($path))->fit($width,$height); |
|
28 | + $img->save(storage_path($newLocation),$quality); |
|
29 | + return asset($newLocation); |
|
30 | + } |
|
31 | + } |
|
32 | 32 | } |
33 | 33 | |
34 | 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 |
38 | 38 | */ |
39 | - function extract_unit($string, $start, $end) |
|
40 | - { |
|
41 | - $pos = stripos($string, $start); |
|
42 | - $str = substr($string, $pos); |
|
43 | - $str_two = substr($str, strlen($start)); |
|
44 | - $second_pos = stripos($str_two, $end); |
|
45 | - $str_three = substr($str_two, 0, $second_pos); |
|
46 | - $unit = trim($str_three); // remove whitespaces |
|
47 | - return $unit; |
|
48 | - } |
|
39 | + function extract_unit($string, $start, $end) |
|
40 | + { |
|
41 | + $pos = stripos($string, $start); |
|
42 | + $str = substr($string, $pos); |
|
43 | + $str_two = substr($str, strlen($start)); |
|
44 | + $second_pos = stripos($str_two, $end); |
|
45 | + $str_three = substr($str_two, 0, $second_pos); |
|
46 | + $unit = trim($str_three); // remove whitespaces |
|
47 | + return $unit; |
|
48 | + } |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | |
52 | 52 | if(!function_exists('now')) { |
53 | - function now() { |
|
54 | - return date('Y-m-d H:i:s'); |
|
55 | - } |
|
53 | + function now() { |
|
54 | + return date('Y-m-d H:i:s'); |
|
55 | + } |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /* |
@@ -69,34 +69,34 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | if(!function_exists('min_var_export')) { |
72 | - function min_var_export($input) { |
|
73 | - if(is_array($input)) { |
|
74 | - $buffer = []; |
|
75 | - foreach($input as $key => $value) |
|
76 | - $buffer[] = var_export($key, true)."=>".min_var_export($value); |
|
77 | - return "[".implode(",",$buffer)."]"; |
|
78 | - } else |
|
79 | - return var_export($input, true); |
|
80 | - } |
|
72 | + function min_var_export($input) { |
|
73 | + if(is_array($input)) { |
|
74 | + $buffer = []; |
|
75 | + foreach($input as $key => $value) |
|
76 | + $buffer[] = var_export($key, true)."=>".min_var_export($value); |
|
77 | + return "[".implode(",",$buffer)."]"; |
|
78 | + } else |
|
79 | + return var_export($input, true); |
|
80 | + } |
|
81 | 81 | } |
82 | 82 | |
83 | 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 | */ |
87 | - function rrmdir($dir) { |
|
88 | - if (is_dir($dir)) { |
|
89 | - $objects = scandir($dir); |
|
90 | - foreach ($objects as $object) { |
|
91 | - if ($object != "." && $object != "..") { |
|
92 | - if (is_dir($dir."/".$object)) |
|
93 | - rrmdir($dir."/".$object); |
|
94 | - else |
|
95 | - unlink($dir."/".$object); |
|
96 | - } |
|
97 | - } |
|
98 | - rmdir($dir); |
|
99 | - } |
|
100 | - } |
|
87 | + function rrmdir($dir) { |
|
88 | + if (is_dir($dir)) { |
|
89 | + $objects = scandir($dir); |
|
90 | + foreach ($objects as $object) { |
|
91 | + if ($object != "." && $object != "..") { |
|
92 | + if (is_dir($dir."/".$object)) |
|
93 | + rrmdir($dir."/".$object); |
|
94 | + else |
|
95 | + unlink($dir."/".$object); |
|
96 | + } |
|
97 | + } |
|
98 | + rmdir($dir); |
|
99 | + } |
|
100 | + } |
|
101 | 101 | } |
102 | 102 |
@@ -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 | */ |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $newLocation = $pathWithoutName.'/w_'.$width.'_h_'.$height.'_'.$basename; |
24 | 24 | if(Storage::exists($newLocation)) { |
25 | 25 | return asset($newLocation); |
26 | - }else{ |
|
26 | + } else{ |
|
27 | 27 | $img = Image::make(storage_path($path))->fit($width,$height); |
28 | 28 | $img->save(storage_path($newLocation),$quality); |
29 | 29 | return asset($newLocation); |
@@ -72,11 +72,13 @@ discard block |
||
72 | 72 | function min_var_export($input) { |
73 | 73 | if(is_array($input)) { |
74 | 74 | $buffer = []; |
75 | - foreach($input as $key => $value) |
|
76 | - $buffer[] = var_export($key, true)."=>".min_var_export($value); |
|
75 | + foreach($input as $key => $value) { |
|
76 | + $buffer[] = var_export($key, true)."=>".min_var_export($value); |
|
77 | + } |
|
77 | 78 | return "[".implode(",",$buffer)."]"; |
78 | - } else |
|
79 | - return var_export($input, true); |
|
79 | + } else { |
|
80 | + return var_export($input, true); |
|
81 | + } |
|
80 | 82 | } |
81 | 83 | } |
82 | 84 | |
@@ -89,10 +91,11 @@ discard block |
||
89 | 91 | $objects = scandir($dir); |
90 | 92 | foreach ($objects as $object) { |
91 | 93 | if ($object != "." && $object != "..") { |
92 | - if (is_dir($dir."/".$object)) |
|
93 | - rrmdir($dir."/".$object); |
|
94 | - else |
|
95 | - unlink($dir."/".$object); |
|
94 | + if (is_dir($dir."/".$object)) { |
|
95 | + rrmdir($dir."/".$object); |
|
96 | + } else { |
|
97 | + unlink($dir."/".$object); |
|
98 | + } |
|
96 | 99 | } |
97 | 100 | } |
98 | 101 | rmdir($dir); |
@@ -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 | } |