@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $path = $this->option('path') ?? 'Models'; |
| 46 | 46 | $models = getAllModelNames(app_path($path)); |
| 47 | 47 | foreach ($models as $name) { |
| 48 | - if (Schema::hasTable(Str::plural($name)) && ! in_array($name, $excluded_models ?? [])) { |
|
| 48 | + if (Schema::hasTable(Str::plural($name)) && !in_array($name, $excluded_models ?? [])) { |
|
| 49 | 49 | $path = $this->getModelPath($name); |
| 50 | 50 | $version = $this->option('v'); |
| 51 | 51 | if ($this->option('rest')) { |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('data', function (Blueprint $table) { |
|
| 16 | + Schema::create('data', function(Blueprint $table) { |
|
| 17 | 17 | $table->id(); |
| 18 | 18 | $table->string('name'); |
| 19 | 19 | $table->json('content')->nullable(); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | $profile = $p ?? Auth::user()->profile ?? Auth::user()->profile()->create(); |
| 75 | 75 | |
| 76 | - return isset($profile->profile_pic) ? (Illuminate\Support\Str::contains($profile->profile_pic, ['https://', 'http://']) ? $profile->profile_pic : asset('storage/' . $profile->profile_pic)) : asset(config('adminetic.profile_placeholder', 'adminetic/static/profile.gif')); |
|
| 76 | + return isset($profile->profile_pic) ? (Illuminate\Support\Str::contains($profile->profile_pic, ['https://', 'http://']) ? $profile->profile_pic : asset('storage/'.$profile->profile_pic)) : asset(config('adminetic.profile_placeholder', 'adminetic/static/profile.gif')); |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | if (!function_exists('random_color')) { |
| 158 | 158 | function random_color() |
| 159 | 159 | { |
| 160 | - return random_color_part() . random_color_part() . random_color_part(); |
|
| 160 | + return random_color_part().random_color_part().random_color_part(); |
|
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | if (!function_exists('deleteImage')) { |
| 189 | 189 | function deleteImage($image) |
| 190 | 190 | { |
| 191 | - $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/' . $image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/' . $image)) : '') : ''; |
|
| 191 | + $image ? (\Illuminate\Support\Facades\File::exists(public_path('storage/'.$image)) ? \Illuminate\Support\Facades\File::delete(public_path('storage/'.$image)) : '') : ''; |
|
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | |
@@ -247,8 +247,8 @@ discard block |
||
| 247 | 247 | function getImg($img, $default) |
| 248 | 248 | { |
| 249 | 249 | if (isset($img)) { |
| 250 | - if (file_exists(public_path('storage/' . $img))) { |
|
| 251 | - return asset('storage/' . $img); |
|
| 250 | + if (file_exists(public_path('storage/'.$img))) { |
|
| 251 | + return asset('storage/'.$img); |
|
| 252 | 252 | } elseif (file_exists(public_path($img))) { |
| 253 | 253 | return asset($img); |
| 254 | 254 | } else { |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | if (!function_exists('putContentToClassFunction')) { |
| 264 | 264 | function putContentToClassFunction($file, $function_name, $data, $closing_token = '}') |
| 265 | 265 | { |
| 266 | - $data = $data . "\n"; |
|
| 266 | + $data = $data."\n"; |
|
| 267 | 267 | // Read the contents of the file into a string |
| 268 | 268 | $contents = file_get_contents($file); |
| 269 | 269 | |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $function_definition = substr($contents, $start_pos, $end_pos - $start_pos + 1); |
| 284 | 284 | |
| 285 | 285 | // Append the new content to the function definition |
| 286 | - $modified_function_definition = rtrim($function_definition, $closing_token) . $data . $closing_token; |
|
| 286 | + $modified_function_definition = rtrim($function_definition, $closing_token).$data.$closing_token; |
|
| 287 | 287 | |
| 288 | 288 | // Replace the original function definition with the modified one in the class definition |
| 289 | 289 | $modified_contents = substr_replace($contents, $modified_function_definition, $start_pos, $end_pos - $start_pos + 1); |