add attachments structure

This commit is contained in:
2023-02-24 12:53:26 +10:00
parent 4ee8fd2400
commit 6ebb915c68
6 changed files with 170 additions and 1 deletions

View File

@@ -29,4 +29,12 @@ class Event extends Model
'hero',
'content'
];
/**
* Get all of the post's attachments.
*/
public function attachments()
{
return $this->morphMany('App\Attachment', 'attachable');
}
}