登录后如何重定向页面?在Laravel 5.2
AuthController
protected $redirectTo = '/';
RedirectUsers
<?php
namespace Illuminate\Foundation\Auth;
trait RedirectsUsers
{
/**
* Get the post register / login redirect path.
*
* @return string
*/
public function redirectPath()
{
if (property_exists($this, 'redirectPath')) {
return $this->redirectPath;
}
return property_exists($this, 'redirectTo') ? $this->redirectTo : '/';
}
}
答案 0 :(得分:0)
您可以使用这两个选项中的任何一个来完成。
答案 1 :(得分:0)
在您已在控制器中写入的身份验证功能中。它会是这样的:
function xyz() {
// your function code
return Redirect::back();
}