I'm creating an e-commerce in laravel and vue js. I am in the following situation
public function show(Product $product){
return $product -> load('categories' , 'images', 'reviews');
}
From this through an axios I can trace all my tables connected to the products. Now, however, I would need to trace from reviews also the users table with which they have a connection. How can I do this on my controller? Such a thing
return $ product -> load ('categories', 'images', 'reviews' -> with ('user');