summaryrefslogtreecommitdiff
path: root/src/SvgServiceProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/SvgServiceProvider.php')
-rw-r--r--src/SvgServiceProvider.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/SvgServiceProvider.php b/src/SvgServiceProvider.php
index a05effe..2fa6a16 100644
--- a/src/SvgServiceProvider.php
+++ b/src/SvgServiceProvider.php
@@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Route;
class SvgServiceProvider extends ServiceProvider
{
const NAMESPACE = 'laralight-svg';
- const ROOT_PATH = __DIR__ . '../';
+ const ROOT_PATH = __DIR__ . '/..';
public $singletons = [
SvgService::class,
@@ -24,16 +24,19 @@ class SvgServiceProvider extends ServiceProvider
]);
$this->mergeConfigFrom(static::ROOT_PATH . '/config/svg.php', 'svg');
- $this->loadViewsFrom(Service::ROOT_PATH . '/resources/views', static::NAMESPACE);
+ $this->loadViewsFrom(static::ROOT_PATH . '/resources/views', static::NAMESPACE);
$this->publishes([
static::ROOT_PATH . '/config/svg.php' => config_path('svg.php'),
], static::NAMESPACE . '-config');
+ $this->registerRoutes();
+ }
+
+ public function registerRoutes()
+ {
Route::get($this->app['config']->get('svg.svg_route'), [SvgController::class, 'serveSvg'])
->name('laralight-svg.serve-svg');
-
-
}
}