Magento, Laravel, Eloquent.
Now let’s say that we want to show the URL of the product on our view by calling the url method that we defined in the product model: @foreach($category->products as $product) <li> <a href="{{ $product->url() }}">{{ $product->name }}</a> </li> @endforeach The problem here is that we’ve introduced