public function boot() { // Set up the morph map for the polymorphic relationships Relation::morphMap(['project' => Project::class, 'template' => Template::class]); }