Showing posts with label redirect url. Show all posts
Showing posts with label redirect url. Show all posts

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");

Tuesday, November 8, 2016

Reload refresh current url or redirect to another url using php script

Refresh/reload current page:
header("Refresh:0");

Or you can redirected to another page using:
header("Refresh:0; url=another-page.php");