İlk temizlik tamamlandı bir önceki projeden
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class CacheBladeViews extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'cache:blade-views';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Dispatch jobs to cache specified blade views';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$this->info('Starting to dispatch cache blade views...');
|
||||
|
||||
$views = [
|
||||
[
|
||||
'view' => 'admin-ajax.register-no-cache',
|
||||
'cache' => 'register-creator'
|
||||
],
|
||||
[
|
||||
'view' => 'admin-ajax.request-ndt-no-cache',
|
||||
'cache' => 'request-ndt'
|
||||
],
|
||||
[
|
||||
'view' => 'admin-ajax.repair-log-no-cache',
|
||||
'cache' => 'repair-log'
|
||||
],
|
||||
[
|
||||
'view' => 'admin-ajax.ndt-order.order-list-no-cache',
|
||||
'cache' => 'ndt-order-list'
|
||||
],
|
||||
[
|
||||
'view' => 'admin-ajax.spool-area-release-no-cache',
|
||||
'cache' => 'spool-area-release'
|
||||
],
|
||||
[
|
||||
'view' => 'admin-ajax.spool-list-no-cache',
|
||||
'cache' => 'spool-list'
|
||||
],
|
||||
[
|
||||
'view' => 'admin.type.spool-release.spool-list-chart-no-cache',
|
||||
'cache' => 'spool-list-chart'
|
||||
],
|
||||
];
|
||||
|
||||
dispatchCacheBladeViews($views);
|
||||
|
||||
$this->info('Cache blade views dispatched successfully.');
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user