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
ataşehir escort maltepe escort bostancı escort kadıköy escort maltepe escort ataşehir escort tuzla escort pendik escort ümraniye escort kartal 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
hatay escort nevsehir escort nigde escort kirikkale escort batman escort osmaniye escort kirklareli escort tokat escort rize escort adiyaman escort gumushane escort batman escort
porno izle
sohbet okey oyna
cialis satış cialis fiyat cialis 20 mg cialis 100 mg cialis 5 mg fiyat

viagra fiyatı

viagra 100 mg fiyat

viagra sipariş

orjinal viagra

viagra satın al

izmir escort