0
To those who work with Laravel
, would know to inform me sources so I can research on how to create URL's
clean and friendly so that, I can pass a parameter, for example, category_name
, or product_name
, and the system of routes
recognize and make the call from view
correspondent?
Detail: I don’t want to have to pass a prefix like categoria/category_name
, produto/product_name
, because so I took the test and it works right.
The idea is, take the value of the url, arrive in the database in the related tables and see which match to decide whether it is a category, a subcategory, a store, a product, I believe that the way is not this, even because the Laravel
tends to make everything simple, and so is complex.
I thank anyone who can give me some guidance to follow, an article talking about it would be of great help and a good start for me.
I ask you: you want to pass for example:
rota/{variavel}
depending on the variable, have a decision is a control method that makes the call of a givenmodel
and itsview
correspondent???– novic