我正在尝试在laravel中添加auth longin功能的特性。请问任何人都可以向我解释: Redirection
的含义及其在PHP 7中的作用但不是5.5的原因吗?无论如何要使它在PHP 5.5中运行。谢谢
use Illuminate\Http\RedirectResponse as Redirection;
trait AuthenticatesUsers
{
public function login(Request $request, Auth $auth) : Redirection
{
$authorized = $auth->guard($this->guard)->attempt($request->only('username', 'password'));
if($authorized){
return redirect($this->redirectTo);
}
return back()->with('authError', 'Login ID or Password is incorrect.')
->withInput($request->except('password'));
}
}