user3818576 user3818576 - 1 year ago 291
PHP Question

header location not working in laravel 5.2

I don't know what's going in laravel. It doesn't work using the Header location in php.

$d = "";
header('Location: '.$d);

and if I use Redirect::to() in my local, nothing happen. Is there something I need to setup first in laravel 5.2?

Answer Source

In Laravel 5.2. You should do like this



return redirect()->to('url');
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download