Enhance categories, add tags, parent
This commit is contained in:
@@ -24,4 +24,15 @@ class Category extends Model
|
||||
{
|
||||
return $this->morphedByMany('App\Models\Shop\Article', 'categorizable');
|
||||
}
|
||||
|
||||
public function Shelves()
|
||||
{
|
||||
return $this->morphedByMany('App\Models\Shop\Category', 'categorizable');
|
||||
}
|
||||
|
||||
public function CategoryTree()
|
||||
{
|
||||
return $this->belongsTo(app('rinvex.categories.category'),'category_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user