Good afternoon. I am working on an application in laravel and I get the following error:
ErrorException Trying to get property of non-object (View: C:\wamp64\www\app-
shop\resources\views\home.blade.php)
How can I solve it thanks.
The important thing here is to understand what that variable is $ detail that you are passing to the view from the controller.
At first glance I would say that the error is given when calling the product, which I assume is a relation with detail: {{ detail->product->featured_image_url }}
Maybe changing that line for the following solve it: {{ detail->product->first()->featured_image_url }}
You should add the first () every time you call product the way you are doing it, I see that you do it several times.