Files
coolify/app/Console/Commands/Seeder.php
Andras Bacsai 16c0cd10d8 rector: arrrrr
2025-01-07 14:52:08 +01:00

24 lines
556 B
PHP

<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class Seeder extends Command
{
protected $signature = 'start:seeder';
protected $description = 'Start Seeder';
public function handle()
{
if (config('constants.seeder.is_seeder_enabled')) {
$this->info('Seeder is enabled on this server.');
$this->call('db:seed', ['--class' => 'ProductionSeeder', '--force' => true]);
exit(0);
}
$this->info('Seeder is disabled on this server.');
exit(0);
}
}