Hello. I have such a table
categories: id | name | slug, hasMany('App\Product') Products: id | name | slug | category_id | brand_id, belongsTo('App\Category'), belongsTo('App\Brand') Brands: id | name | slug |, hasMany('App\Product') The problem is that when I try to bring manufacturers into the category with this function
// category model public function brands() { return $this->hasManyThrough('App\Brand', 'App\Product' 'brand_id', 'id'); } That producers either are not displayed, or are not displayed correctly (not in its category). Is there any other way to get manufacturers through products?