This commit is contained in:
Bozhidar 2024-04-29 11:41:52 +03:00
parent 9e18e7a245
commit fc22ab52b2

View file

@ -0,0 +1,37 @@
<?php
namespace App\Console\Commands;
use App\Models\Domain;
use Illuminate\Console\Command;
class RunDomainRepair extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'phyre:run-domain-repair';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
$getAllDomains = Domain::all();
if ($getAllDomains->count() > 0) {
foreach ($getAllDomains as $domain) {
$this->info('Repair domain: ' . $domain->domain);
$domain->configureVirtualHost();
}
}
}
}