Laravel redirect with logout not working

前端 未结 7 1266
夕颜
夕颜 2021-01-30 09:41

I am Using laravel 4 framework\'s. When I used redirect after the Auth::logout(), the redirection was not working. I used View::make() too, but same \"Whoops, looks like somethi

7条回答
  •  梦如初夏
    2021-01-30 10:01

    I learned that I was getting the logout error in my application because I was using

    Route::post('logout', array('uses' => 'SessionController@doLogout'));
    

    Just remember to use the following instead.

    Route::get('logout', array('uses' => 'SessionController@doLogout'));
    

    This worked smoothly.

提交回复
热议问题