app->environment('local') && class_exists(\Laravel\Telescope\TelescopeServiceProvider::class)) { $this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class); $this->app->register(TelescopeServiceProvider::class); } } /** * Bootstrap any application services. */ public function boot(): void { Date::use(CarbonImmutable::class); // As there are concerned with application correctness // leave them enable all the time. Model::preventAccessingMissingAttributes(); Model::preventSilentlyDiscardingAttributes(); // Since this is a performance concern only, don't halt // production for violations. Model::preventLazyLoading(!$this->app->isProduction()); Relation::enforceMorphMap([ 'chat' => Chat::class, 'message' => Message::class ]); JsonResource::withoutWrapping(); Http::macro('inference', fn() => Http::baseUrl(config('services.inference.host'))->timeout(120)); } }