Cookiebot / Pixel / Kategorien erweitern
This commit is contained in:
parent
36872100c6
commit
7d1ee844eb
28 changed files with 464 additions and 246 deletions
|
|
@ -79,7 +79,7 @@ class Category extends Model
|
|||
|
||||
public function product_categories()
|
||||
{
|
||||
return $this->hasMany('App\Models\ProductCategory', 'category_id', 'id');
|
||||
return $this->hasMany('App\Models\ProductCategory', 'category_id', 'id')->orderBy('pos', 'DESC');
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ class Product extends Model
|
|||
}
|
||||
|
||||
public function categories(){
|
||||
return $this->hasMany('App\Models\ProductCategory', 'product_id', 'id');
|
||||
return $this->hasMany('App\Models\ProductCategory', 'product_id', 'id')->orderBy('pos', 'DESC');
|
||||
}
|
||||
|
||||
public function images(){
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class ProductCategory extends Model
|
|||
protected $table = 'product_categories';
|
||||
|
||||
protected $fillable = [
|
||||
'product_id', 'category_id',
|
||||
'product_id', 'category_id', 'pos'
|
||||
];
|
||||
|
||||
public function product()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue