1 | <?php |
||
8 | |||
9 | class FlushVarnishCache extends Command |
||
10 | { |
||
11 | /** |
||
12 | * The console command name. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $signature = 'varnish:flush'; |
||
17 | |||
18 | /** |
||
19 | * The console command description. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $description = 'Flush the varnish cache.'; |
||
24 | |||
25 | /** |
||
26 | * Execute the console command. |
||
27 | * |
||
28 | * @return mixed |
||
29 | */ |
||
30 | public function handle() |
||
31 | { |
||
32 | (new Varnish())->flush(); |
||
33 | |||
34 | $this->comment('The varnish cache has been flushed!'); |
||
35 | } |
||
36 | } |
||
37 |