![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /home/fdshops/public_html/vendor/arcanedev/log-viewer/src/Commands/ |
<?php declare(strict_types=1); namespace Arcanedev\LogViewer\Commands; use Arcanedev\LogViewer\LogViewerServiceProvider; use Symfony\Component\Console\Input\InputOption; /** * Class PublishCommand * * @author ARCANEDEV <arcanedev.maroc@gmail.com> */ class PublishCommand extends Command { /* ----------------------------------------------------------------- | Properties | ----------------------------------------------------------------- */ /** * The console command name. * * @var string */ protected $name = 'log-viewer:publish'; /** * The console command description. * * @var string */ protected $description = 'Publish all LogViewer resources and config files'; /** * The name and signature of the console command. * * @var string */ protected $signature = 'log-viewer:publish {--tag= : One or many tags that have assets you want to publish.} {--force : Overwrite any existing files.}'; /* ----------------------------------------------------------------- | Main Methods | ----------------------------------------------------------------- */ /** * Execute the console command. */ public function handle(): int { $args = [ '--provider' => LogViewerServiceProvider::class, ]; if ((bool) $this->option('force')) { $args['--force'] = true; } $args['--tag'] = [$this->option('tag')]; $this->displayLogViewer(); $this->call('vendor:publish', $args); return static::SUCCESS; } /** * Get the console command options. * * @return array * * @codeCoverageIgnore */ protected function getOptions() { return [ ['tag', 't', InputOption::VALUE_OPTIONAL, 'One or many tags that have assets you want to publish.', ''], ['force', 'f', InputOption::VALUE_OPTIONAL, 'Overwrite any existing files.', false], ]; } }