FEATURE: add artisan shortcut for publishing assets and views

This commit is contained in:
Michal Kváček
2016-10-11 15:32:06 +02:00
parent efa3289491
commit 4bd5a61fde
3 changed files with 36 additions and 2 deletions
@@ -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]);
}
}
+3 -2
View File
@@ -2,7 +2,7 @@
namespace App\Console;
use App\Console\Commands\AddLanguage;
use App\Console\Commands\PublishTemplateResources;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
@@ -22,7 +22,8 @@ class Kernel extends ConsoleKernel
Commands\TranslateAll::class,
Commands\InitDatabaseSchema::class,
Commands\SetTemplate::class,
AddLanguage::class
Commands\AddLanguage::class,
PublishTemplateResources::class
];
/**