Metadata - Tags の多対多リレーション追加
This commit is contained in:
1 parent
91c786199a
commit
1322e89b86
2 files changed
+38
No files matched your search
@@ -14,4 +14,9 @@ class Metadata extends Model
|
||||
protected $visible = ['url', 'title', 'description', 'image', 'expires_at'];
|
||||
|
||||
protected $dates = ['created_at', 'updated_at', 'expires_at'];
|
||||
|
||||
public function tags()
|
||||
{
|
||||
return $this->belongsToMany(Tag::class)->withTimestamps();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user