user3818576 user3818576 - 11 months ago 125
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');