[英]Laravel 5.6 Auth Logout Fail
commerce with Laravel.与 Laravel 进行贸易。 I click the "Log Out" button, but the Exit Process does not work.
我单击“注销”按钮,但退出过程不起作用。
I'm not getting any errors.我没有收到任何错误。 He's just leading me to the homepage.
他只是把我带到主页。
web.php Code web.php 代码
Route::group(['prefix'=>'kullanici'], function() {
Route::get('/logout', 'KullaniciController@logout')->name('kullanici.logout'); });
Controller Code Controller 代码
use Illuminate\Auth;
public function logout() {
auth()->logout();
return redirect('/');
}
Html Code Html 代码
<a class="dropdown-item" href="{{ route('kullanici.logout') }}" >Çıkış Yap</a>
You should try this你应该试试这个
public function logout() {
Auth::logout();
return redirect('/');
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.