summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Light <samlight1994@gmail.com>2024-06-16 21:37:11 +0100
committerSam Light <samlight1994@gmail.com>2024-06-16 21:37:11 +0100
commitfce7e80cdd137e8afd71a61998a57a3cd5e11ef8 (patch)
treebf438e4feea05ee0e13357a6df88e3d49c30d8b2
parentbf7f0af3fde5fc3f253685c2905653cd953b37a5 (diff)
Register clear cache command
-rw-r--r--src/SvgServiceProvider.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/SvgServiceProvider.php b/src/SvgServiceProvider.php
index 2fa6a16..9bd604f 100644
--- a/src/SvgServiceProvider.php
+++ b/src/SvgServiceProvider.php
@@ -3,6 +3,7 @@
namespace Lightscale\LaralightSvg;
use Lightscale\LaralightSvg\Http\Controllers\SvgController;
+use Lightscale\LaralightSvg\Console\Commands;
use Illuminate\Foundation\Console\AboutCommand;
use Illuminate\Support\ServiceProvider;
@@ -31,6 +32,10 @@ class SvgServiceProvider extends ServiceProvider
], static::NAMESPACE . '-config');
$this->registerRoutes();
+
+ if ($this->app->runningInConsole()) {
+ $this->registerCommands();
+ }
}
public function registerRoutes()
@@ -39,4 +44,11 @@ class SvgServiceProvider extends ServiceProvider
->name('laralight-svg.serve-svg');
}
+ public function registerCommands()
+ {
+ $this->commands([
+ Commands\SvgClearState::class
+ ]);
+ }
+
}