2017-08-15 140 views
0

在laravel 5.4中,我可以在注销后更改默认重定向路径,其中是“auth”中间件的文件位置?Laravel 5.4注销重定向

在这里,我使用的代码在我homecontroller.php -

public function __construct() 
{ 
    $this->middleware('auth'); 
} 

现在,我要自定义的“权威性”的中间件。但我找不到位置。

+3

的可能的复制[如何注销时更改重定向URL?](HTTPS ://stackoverflow.com/questions/29797433/how-to-change-the-redirect-url-when-logging-out) –

回答

0

类:应用程序/ HTTP /控制器/认证/ AuthController.php

添加以下属性添加到该类

protected $redirectAfterLogout = 'auth/new_redirect';