FEATURE: add artisan shortcut for publishing assets and views
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
|
||||||
|
class PublishTemplateResources extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'template:publish';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Publish assets and views for currently set template';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$this->call('vendor:publish', ['--tag' => 'module-views', '--force' => true]);
|
||||||
|
$this->call('vendor:publish', ['--tag' => 'public-assets', '--force' => true]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Console;
|
namespace App\Console;
|
||||||
|
|
||||||
use App\Console\Commands\AddLanguage;
|
use App\Console\Commands\PublishTemplateResources;
|
||||||
use Illuminate\Console\Scheduling\Schedule;
|
use Illuminate\Console\Scheduling\Schedule;
|
||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||||
|
|
||||||
@@ -22,7 +22,8 @@ class Kernel extends ConsoleKernel
|
|||||||
Commands\TranslateAll::class,
|
Commands\TranslateAll::class,
|
||||||
Commands\InitDatabaseSchema::class,
|
Commands\InitDatabaseSchema::class,
|
||||||
Commands\SetTemplate::class,
|
Commands\SetTemplate::class,
|
||||||
AddLanguage::class
|
Commands\AddLanguage::class,
|
||||||
|
PublishTemplateResources::class
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user