src/Console/Commands/InstallCommand.php
<?php
declare(strict_types=1);
namespace Cortex\Attributes\Console\Commands;
use Illuminate\Console\Command;
class InstallCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'cortex:install:attributes {--f|force : Force the operation to run when in production.} {--r|resource=* : Specify which resources to publish.}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Install Cortex Attributes Module.';
/**
* Execute the console command.
*
* @return void
*/
public function handle(): void
{
$this->alert($this->description);
$this->call('cortex:publish:attributes', ['--force' => $this->option('force'), '--resource' => $this->option('resource')]);
$this->call('cortex:migrate:attributes', ['--force' => $this->option('force')]);
$this->call('cortex:seed:attributes');
}
}