Friday, February 24, 2017

Http Redirect Using Laravel

Laravel is a strong php based framework today. It is very important forward to another url or redirect as http function. There are several ways describes in Laravel. The best way is redirect using Controller & Action. Using Controller Action is easy to redirect to another url:

return redirect()->action(
    'SomeController@action', ['id' => 1, 'status' => 'active']
);


Or you also can do the following:

return redirect("/afterRedirect/param1?x=1&y=2");

No comments:

Post a Comment