|
|
|
@ -2,7 +2,25 @@ |
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Inspiring; |
|
|
|
|
use Illuminate\Support\Facades\Artisan; |
|
|
|
|
use Illuminate\Support\Facades\DB; |
|
|
|
|
|
|
|
|
|
Artisan::command('inspire', function () { |
|
|
|
|
$this->comment(Inspiring::quote()); |
|
|
|
|
})->purpose('Display an inspiring quote'); |
|
|
|
|
|
|
|
|
|
// xóa tất cả các cache |
|
|
|
|
Artisan::command('app:clean', function () { |
|
|
|
|
$this->call('cache:clear'); |
|
|
|
|
$this->call('config:clear'); |
|
|
|
|
$this->call('view:clear'); |
|
|
|
|
$this->call('route:clear'); |
|
|
|
|
$this->info("App cache cleared."); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// kiểm tra trình trạng database, storage |
|
|
|
|
Artisan::command('system:check', function () { |
|
|
|
|
$db = DB::connection()->getDatabaseName(); |
|
|
|
|
$storage = storage_path(); |
|
|
|
|
$this->info("Database: {$db}"); |
|
|
|
|
$this->info("Storage path: {$storage}"); |
|
|
|
|
}); |
|
|
|
|