belongs to media

This commit is contained in:
2023-03-29 14:58:31 +10:00
parent 56673fceaa
commit f7503d1f20

View File

@@ -25,4 +25,13 @@ class Attachment extends Model
public function attachable()
{
return $this->morphTo();
}}
}
/**
* Get the media for this attachment.
*/
public function media()
{
return $this->belongsTo(Media::class);
}
}