Total Complexity | 3 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Purge extends Command |
||
10 | { |
||
11 | /** Required for Laravel 5.0 */ |
||
12 | protected $name = 'assets:purge'; |
||
13 | |||
14 | /** |
||
15 | * The name and signature of the console command. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $signature = 'assets:purge {--days=0 : Only delete files older than this number of days}'; |
||
20 | |||
21 | /** |
||
22 | * The console command description. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $description = 'Delete generated CSS and JS files'; |
||
27 | |||
28 | /** |
||
29 | * An instance of our assets object. |
||
30 | * |
||
31 | * @var Assets $assets |
||
32 | */ |
||
33 | private $assets; |
||
34 | |||
35 | /** |
||
36 | * Create a command |
||
37 | * |
||
38 | * @param Assets $assets |
||
39 | */ |
||
40 | public function __construct(Assets $assets) |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Execute the console command. |
||
49 | */ |
||
50 | public function handle() |
||
51 | { |
||
52 | $this->assets->purge($this); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * Get the console command options. |
||
57 | * |
||
58 | * @return array |
||
59 | */ |
||
60 | protected function getOptions() |
||
64 | ]; |
||
65 | } |
||
67 |