Answer the question
In order to leave comments, you need to log in
Why do I get a link with a get request instead of a link via route?
I'm trying to create a button that takes the name of the category and the product itself from the database, the link is like:
site/product_category/product_self
Here's how I tried to implement it:
{{ route('product', [$product->category->code, $product->code]) }}
Answer the question
In order to leave comments, you need to log in
Because your route has only one parameter for the category code, and the second parameter is not there, so Laravel adds it as a get.
Perhaps you have two routes and you incorrectly specify the name of the desired one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question