mercredi 24 octobre 2018

Redirect a route with parameters in url to another route with these parameters (Laravel)

I have a url and I want make a redirection and I want to keep the url parameters. I'm using the ->with method but it doesn't work.

Example: http://mywebsite.local/product-name-random?select_article=710

I want redirect this url to: http://mywebsite.local/father-category-of-this-product?select_article=710

I'm using this code but it doesn't work:

return redirect()->route('web.custom_url', $father_cathegory->seo->slug)->with('select_article', Input::get('select_article')); 

->with() is not working. Nothing happens.

Im using Laravel 5.5.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire