Laravel 5.3 LoginController - Header may not contain more than a single header, new line detected

前端 未结 4 568
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-12 05:28

I have a problem when changing the default LoginController redirect after login, I\'m getting an ErrorException in Response.php line 339: Header may not

4条回答
  •  無奈伤痛
    2021-01-12 06:01

    The method redirectTo should return an url path, not the Redirect response.

    ...
    protected function redirectTo()
    {
        if(\Auth::user()->hasRole('copy')){
            return '/copy/dashboardCopy';
        }       
    }
    ...
    

提交回复
热议问题