2017-06-12 151 views
0

如果輸入(/ public/login或(/ public/logout),則無法從鏈接(/ public/auth/logout)註銷 我在RouteCollection.php中獲取NotFoundHttpException行161:Laravel 5.2無法註銷,RouteCollection.php中的NotFoundHttpException

這是我的PHP工匠路線:列表

+--------+--------------------------------+----------------------------------------------------+-------------------+---------------------------------------------------------------+------------+ 
| Domain | Method       | URI            | Name    | Action              | Middleware | 
+--------+--------------------------------+----------------------------------------------------+-------------------+---------------------------------------------------------------+------------+ 
|  | GET|HEAD      |/            |     | Closure              | web  | 
|  | GET|HEAD      | auth/login/{one?}/{two?}/{three?}/{four?}/{five?} | auth.login  | LaravelCms\Http\Controllers\Auth\[email protected]  | web,guest | 
|  | POST       | auth/login/{one?}/{two?}/{three?}/{four?}/{five?} |     | LaravelCms\Http\Controllers\Auth\[email protected]  | web,guest | 
|  | GET|HEAD      | auth/logout/{one?}/{two?}/{three?}/{four?}/{five?} | auth.logout  | LaravelCms\Http\Controllers\Auth\[email protected]  | web,guest | 
|  | GET|HEAD|POST|PUT|PATCH|DELETE | auth/{_missing}         |     | LaravelCms\Http\Controllers\Auth\[email protected] | web,guest | 
|  | GET|HEAD      | backend/dashboard         | backend.dashboard | LaravelCms\Http\Controllers\Backend\[email protected] | web,auth | 
+--------+--------------------------------+----------------------------------------------------+-------------------+---------------------------------------------------------------+------------+ 

回答

0

你需要使用/類型auth/logout(即沒有0​​,假設你的.htaccess文件已經設置和您直接從服務文件public文件夾)

否則,使用public/auth/logout就足以讓您註銷。

如果一切都失敗,請嘗試:

public/index.php/auth/logout 
+0

這是行不通的,我得到(未找到)/大衆/是安裝lavarel指數在那裏,需要在那裏我有它不是問題重定向到/ auth/logout – brody

+0

當你進入'public/auth/logout'時會發生什麼?你有沒有正確設置'.htaccess'文件?我已經用最壞的情況更新了答案。 –

相關問題