From c34e49b1d57a1a327ce15b9ac3026217f8f44a7c Mon Sep 17 00:00:00 2001 From: Rachid Laasri <36804104+rashidlaasri@users.noreply.github.com> Date: Wed, 12 Sep 2018 15:13:10 +0100 Subject: [PATCH] Add botman:cache:clear command (#26) --- src/Console/Commands/BotManCacheClear.php | 50 +++++++++++++++++++++++ src/Providers/StudioServiceProvider.php | 2 + 2 files changed, 52 insertions(+) create mode 100644 src/Console/Commands/BotManCacheClear.php diff --git a/src/Console/Commands/BotManCacheClear.php b/src/Console/Commands/BotManCacheClear.php new file mode 100644 index 0000000..2e3b5e1 --- /dev/null +++ b/src/Console/Commands/BotManCacheClear.php @@ -0,0 +1,50 @@ +exists($cacheFolder)) { + $files->cleanDirectory($cacheFolder); + } + + $this->info('BotMan cache cleared!'); + } +} diff --git a/src/Providers/StudioServiceProvider.php b/src/Providers/StudioServiceProvider.php index d557627..b774167 100644 --- a/src/Providers/StudioServiceProvider.php +++ b/src/Providers/StudioServiceProvider.php @@ -5,6 +5,7 @@ use Illuminate\Support\ServiceProvider; use TheCodingMachine\Discovery\Discovery; use BotMan\Studio\Console\Commands\BotManMakeTest; +use BotMan\Studio\Console\Commands\BotManCacheClear; use BotMan\Studio\Console\Commands\BotManListDrivers; use BotMan\Studio\Console\Commands\BotManInstallDriver; use BotMan\Studio\Console\Commands\BotManMakeMiddleware; @@ -23,6 +24,7 @@ public function register() BotManMakeMiddleware::class, BotManMakeConversation::class, BotManMakeTest::class, + BotManCacheClear::class, ]); $this->discoverCommands();