morphOne(File::class, 'fileable') ->where('relation_name', $relation); } public function hasMultiFile(string $relation): MorphMany { return $this->morphMany(File::class, 'fileable') ->where('relation_name', $relation); } }