belongsToMany('App\Models\Articles', 'recipes_articles', 'recipe_id', 'article_id'); } public function products() { return $this->hasMany('App\Models\Products', 'recipe_id'); } public function product1() { return $this->belongsTo('App\Models\Products', 'associated_product1'); } public function product2() { return $this->belongsTo('App\Models\Products', 'associated_product2'); } public function customers() { return $this->belongsToMany('App\Models\Customers', 'customer_recipe', 'recipe_id', 'customer_id'); } }