commerce with 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
Route::group(['prefix'=>'kullanici'], function() {
Route::get('/logout', 'KullaniciController@logout')->name('kullanici.logout'); });
Controller Code
use Illuminate\Auth;
public function logout() {
auth()->logout();
return redirect('/');
}
Html Code
<a class="dropdown-item" href="{{ route('kullanici.logout') }}" >Çıkış Yap</a>
You should try this
public function logout() {
Auth::logout();
return redirect('/');
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.