belongsTo(User::class); } public function attachments(): MorphMany { return $this->morphMany(Attachment::class, 'attachable'); } public function ratings(): MorphMany { return $this->morphMany(Rating::class, 'rateable'); } }