forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystemMaintenance.php
More file actions
43 lines (35 loc) · 820 Bytes
/
SystemMaintenance.php
File metadata and controls
43 lines (35 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
class SystemMaintenance extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:system-maintenance';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Functions to keep Speedtest Tracker nice and healthy.';
/**
* Execute the console command.
*/
public function handle()
{
$this->refreshCache();
return Command::SUCCESS;
}
/**
* Clear and refresh the cache.
*/
protected function refreshCache(): void
{
Artisan::call('optimize:clear');
Artisan::call('optimize');
}
}