diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index aac8f3d..3c37507 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -26,7 +26,7 @@ public function boot(): void public function register() { $this->app->singleton(SluggableObserver::class, function ($app) { - return new SluggableObserver(new SlugService(), $app['events']); + return new SluggableObserver($this->app->make(SlugService::class), $app['events']); }); }