add nova
This commit is contained in:
49
nova/src/Console/PublishCommand.php
Normal file
49
nova/src/Console/PublishCommand.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
namespace Laravel\Nova\Console;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name: 'nova:publish')]
|
||||
class PublishCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'nova:publish {--force : Overwrite any existing files}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Publish all of the Nova resources';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->call('vendor:publish', [
|
||||
'--tag' => 'nova-config',
|
||||
'--force' => $this->option('force'),
|
||||
]);
|
||||
|
||||
$this->call('vendor:publish', [
|
||||
'--tag' => 'nova-assets',
|
||||
'--force' => true,
|
||||
]);
|
||||
|
||||
$this->call('vendor:publish', [
|
||||
'--tag' => 'nova-lang',
|
||||
'--force' => $this->option('force'),
|
||||
]);
|
||||
|
||||
$this->call('view:clear');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user