belongs to media
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user