app->singleton(ApiService::class, function () { return new ApiService(); }); $this->app->singleton(ApiService::class, fn () => new ApiService()); $this->app->singleton(NotificationApiService::class, fn () => new NotificationApiService()); $this->app->singleton(StationApiService::class, fn () => new StationApiService()); $this->app->singleton(CookieService::class, fn () => new CookieService()); } public function boot() { // ... } }