From 9d4afa825db3aeb6d4949619da8ccb4cc47c7a59 Mon Sep 17 00:00:00 2001 From: Afiq Hamzah Date: Thu, 8 Aug 2024 14:36:13 +0800 Subject: [PATCH] Update clear cache all add command to clear session files also --- ...{ClearAllCaches.php => ClearCachesAll.php} | 3 +- app/Console/Commands/ClearSessions.php | 41 +++++++++++++++++++ app/View/Components/Table.php | 28 +++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) rename app/Console/Commands/{ClearAllCaches.php => ClearCachesAll.php} (91%) create mode 100644 app/Console/Commands/ClearSessions.php create mode 100644 app/View/Components/Table.php diff --git a/app/Console/Commands/ClearAllCaches.php b/app/Console/Commands/ClearCachesAll.php similarity index 91% rename from app/Console/Commands/ClearAllCaches.php rename to app/Console/Commands/ClearCachesAll.php index a2c0825..1e38ced 100644 --- a/app/Console/Commands/ClearAllCaches.php +++ b/app/Console/Commands/ClearCachesAll.php @@ -4,7 +4,7 @@ namespace App\Console\Commands; use Illuminate\Console\Command; -class ClearAllCaches extends Command +class ClearCachesAll extends Command { /** * The name and signature of the console command. @@ -34,6 +34,7 @@ class ClearAllCaches extends Command $this->call('optimize:clear'); $this->call('package:discover'); $this->call('queue:clear'); + $this->call('clear-sessions'); $this->info("All caches have been cleared.");; diff --git a/app/Console/Commands/ClearSessions.php b/app/Console/Commands/ClearSessions.php new file mode 100644 index 0000000..5b9ff04 --- /dev/null +++ b/app/Console/Commands/ClearSessions.php @@ -0,0 +1,41 @@ +info('Session files cleared successfully.'); + + return 0; + } +} diff --git a/app/View/Components/Table.php b/app/View/Components/Table.php new file mode 100644 index 0000000..e3674b7 --- /dev/null +++ b/app/View/Components/Table.php @@ -0,0 +1,28 @@ +