app->bind(BootstrapData::class, AppBootstrapData::class); Relation::enforceMorphMap([ Title::MODEL_TYPE => Title::class, 'movie' => Title::class, 'series' => Title::class, Season::MODEL_TYPE => Season::class, Episode::MODEL_TYPE => Episode::class, Person::MODEL_TYPE => Person::class, NewsArticle::MODEL_TYPE => NewsArticle::class, ]); Model::preventLazyLoading(!$this->app->isProduction()); // This will only work when loading from collection, because we need access to channel config Channel::resolveRelationUsing( 'items', fn(Channel $channel) => $channel->morphedByMany( modelTypeToNamespace( $channel->config['contentModel'] ?? Title::class, ), 'channelable', ), ); if (config('common.site.disable_scout_auto_sync')) { foreach (ImportRecordsIntoScout::getSearchableModels() as $model) { $model::disableSearchSyncing(); } } } public function register(): void { // bind analytics $this->app->bind( GetAnalyticsHeaderDataAction::class, GetAnalyticsHeaderData::class, ); $this->app->bind(AppUrlGenerator::class, UrlGenerator::class); $this->app->bind(ValueLists::class, AppValueLists::class); } }