How to Redirect a named route with query string in Laravel

How to Redirect a named route with query string in Laravel

Sometime you need to pass extra parameter as query string in Laravel route that is not part of a route parameters so don't worry, you can pass everything as query string in route that is defined in route parameter.

Simple Redirect to Named Routes
return redirect()->route('dashboard');
Redirect named route with query string
  1. return redirect()->route('dashboard',['product_id'=>1])
  2. ->with('message','Welcome to ExpertPHP.');

Here i am passing message variable as Flashed Session Data which you can use in your view to display message.

Redirect to Controller Action

You can also redirect to controller action, for this pass the controller name with action.

return redirect()->action('UserController@dashboard');
Redirect to another URL
 return redirect('user/dashboard');

Phone: (+91) 8800417876
Noida, 201301
kadıköy escort tuzla escort kurtköy escort kartal escort maltepe escort bakırköy escort ataşehir escort
En kaliteli ve Gerçek sex hikaye 'lerini okuyabilir ve kendi seks hikayelerinizi paylaşabilirsiniz.
Türkiyenin en iyi hd porno izle sitesi 7dak ile doyumsuz türk sikişleri seyredin.
şişli escort
pendik escort
izmir escort izmir escort izmir escort izmir escort denizli escort antalya escort antalya escort antalya escort izmir escort izmir escort izmir escort izmir escort izmir escort
ankara escort
çeşme escort
kurtköy escort escort pendik
Betwinner