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.');
}
}

27
app/Console/Kernel.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}