mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
35 lines
824 B
PHP
35 lines
824 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Console\Commands\Models;
|
|
|
|
use App\Actions\Models\Aggregate\SyncViewAggregatesAction;
|
|
use App\Console\Commands\BaseCommand;
|
|
use Illuminate\Contracts\Validation\Validator;
|
|
use Illuminate\Support\Facades\Validator as ValidatorFacade;
|
|
|
|
class SyncViewAggregatesCommand extends BaseCommand
|
|
{
|
|
protected $signature = 'view:sync-aggregates';
|
|
|
|
protected $description = 'Synchronizes views in the aggregates table';
|
|
|
|
public function handle(): int
|
|
{
|
|
$action = new SyncViewAggregatesAction();
|
|
|
|
$result = $action->handle();
|
|
|
|
$result->toLog();
|
|
$result->toConsole($this);
|
|
|
|
return $result->hasFailed() ? 1 : 0;
|
|
}
|
|
|
|
protected function validator(): Validator
|
|
{
|
|
return ValidatorFacade::make($this->options(), []);
|
|
}
|
|
}
|