You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
749 B
26 lines
749 B
<?php
|
|
|
|
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}");
|
|
});
|
|
|