Enhance categories, add tags, parent

This commit is contained in:
Ludovic CANDELLIER
2021-08-26 17:45:37 +02:00
parent e407934e2a
commit 8d3ccbf148
9 changed files with 60 additions and 44 deletions

View File

@@ -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');
}
}