Fixes on available offers in category childrens for building menu
This commit is contained in:
@@ -18,9 +18,9 @@ class Categorizable extends Model
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
|
||||
public function articles()
|
||||
public function article()
|
||||
{
|
||||
return $this->belongsTo(Article::class)->where('categorizable_type', Article::class);
|
||||
return $this->belongsTo(Article::class, 'categorizable_id');
|
||||
}
|
||||
|
||||
public function scopeByCategory($query, $category_id)
|
||||
|
||||
Reference in New Issue
Block a user