If you're using the default laravel Auth handler, you can use Redirect::intended()
Thanks for the reply.
I would like this link to point to the login page, then send the user to form.php once logged in
https://xx.xx.xx.x/test/test/form.php?p=259&c=gdfg56y6y
I keep getting sent to the fallback url and not the intended page.
Can anyone help?
// check password with hash in db
if (Hash::check(Input::get('password'), $user->password)){
//log them in
Auth::login($user);
// redirect to original path, otherwise fallback to 'test'
return Redirect::intended('test');
}else{
// password fail, redirect to login
return Redirect::to('admin/login')->with('message', 'Incorrect password, please try again.');
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community