multiauth_tutorial
multiauth_tutorial copied to clipboard
problem when logout ...
trafficstars
hello, i updated my code to version 4
but when i call the method logout in form
` logout
<form id="logout-form" action="{{ route('admin.logout') }}" method="POST" style="display: none;">
{{ csrf_field() }}
</form>
i get this error : MethodNotAllowedHttpException in RouteCollection.php line 233
the method work fine if i call the link from browser ....
==> localhost/enseigant/logout
`
its because you are using POST method in form, but using GET method in route. Use this
Route::POST('/logout', 'Auth\AdminLoginController@logout')->name('admin.logout');
Issue seems to be resolved. Requesting to close issue. @jacurtis