Session laravel 5.2中的Auth::注销不起作用

Session laravel 5.2中的Auth::注销不起作用,session,authentication,controller,laravel-5.2,Session,Authentication,Controller,Laravel 5.2,我的问题很相似 我使用的是Laravel 5.2 我的路线:列表 我的注销链接 <a href="logout" class="btn1 btn-1 btn1-1b">Logout</a> My route.php Route::get('profile/logout', 'Auth\AuthController@getLogout'); 此路径位于中间件的外侧 AuthController.php public function __construct() {

我的问题很相似

我使用的是Laravel 5.2

我的路线:列表

我的注销链接

<a href="logout" class="btn1 btn-1 btn1-1b">Logout</a>
My route.php

Route::get('profile/logout', 'Auth\AuthController@getLogout');
此路径位于中间件的外侧

AuthController.php

public function __construct()
{
     $this->middleware('guest', ['except' => ['logout', 'getLogout']]);
}

当“注销”按钮单击时,其按会话要求重定向并没有结束,因为自Laravel 5.2以来,如果我通过URL访问,我仍然登录,您应该添加web中间件以使用会话。尝试在构造函数或路由中添加web中间件

自从Laravel 5.2以来,您应该添加web中间件来使用会话。尝试在构造函数或路由中添加web中间件

谢谢你的回答, 我通过使用LaravelBlade组织布局来解决这个问题

在我的视图下有子文件夹之前

所以我设法拉出了所有的子文件夹,将它们对齐在视图下,如下所示

--观点

---布局

-------default.blade.php

-------sidebar.blade.php

---侧面图

-------home.blade.php

-------关于.blade.php

-------projects.blade.php

-------contact.blade.php

-------create.blade.php

---包括

-------head.blade.php

-------header.blade.php

-------footer.blade.php


-------sidebar.blade.php

感谢您的回答, 我通过使用LaravelBlade组织布局来解决这个问题

在我的视图下有子文件夹之前

所以我设法拉出了所有的子文件夹,将它们对齐在视图下,如下所示

--观点

---布局

-------default.blade.php

-------sidebar.blade.php

---侧面图

-------home.blade.php

-------关于.blade.php

-------projects.blade.php

-------contact.blade.php

-------create.blade.php

---包括

-------head.blade.php

-------header.blade.php

-------footer.blade.php


-------sidebar.blade.php

如果您通过url访问what,则仍然登录?www.mydomainname.com/profile/create如果您通过url访问what,则仍然登录?www.mydomainname.com/profile/create
public function __construct()
{
     $this->middleware('guest', ['except' => ['logout', 'getLogout']]);
}