initial import

This commit is contained in:
2025-07-30 09:47:03 +02:00
commit b0a186a324
292 changed files with 32323 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Style;
class FixStyleImagePaths extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:fix-style-image-paths';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Prepend style_previews/ to the preview_image path for all styles';
/**
* Execute the console command.
*/
public function handle()
{
$styles = Style::all();
foreach ($styles as $style) {
if (!str_starts_with($style->preview_image, 'style_previews/')) {
$style->preview_image = 'style_previews/' . $style->preview_image;
$style->save();
}
}
$this->info('Image paths for styles have been updated successfully.');
}
}