feat: add tags
This commit is contained in:
@@ -28,7 +28,10 @@ public function category()
|
||||
{
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
|
||||
public function tags()
|
||||
{
|
||||
return $this->belongsToMany(Tag::class, 'media_tag');
|
||||
}
|
||||
public function notes()
|
||||
{
|
||||
return $this->morphMany(Note::class, 'noteable');
|
||||
|
||||
@@ -12,5 +12,9 @@ public function questions()
|
||||
{
|
||||
return $this->belongsToMany(Question::class);
|
||||
}
|
||||
public function media()
|
||||
{
|
||||
return $this->belongsToMany(Media::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user