Add method to get offers by articles with siblings, enhance display
This commit is contained in:
@@ -50,6 +50,11 @@ class Article extends Model implements HasMedia
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
public function siblings()
|
||||
{
|
||||
return $this->hasMany(Article::class, 'name', 'name');
|
||||
}
|
||||
|
||||
public function tags()
|
||||
{
|
||||
return $this->morphToMany(Tag::class, 'taggable');
|
||||
|
||||
Reference in New Issue
Block a user