Add Base Controller

master
sundayenglish 3 weeks ago
parent b9e581b921
commit b1c5f0d771
  1. 18
      routes/console.php

@ -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}");
});

Loading…
Cancel
Save