Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem when logout ... #6

Open
acharmat opened this issue Jun 2, 2017 · 2 comments
Open

problem when logout ... #6

acharmat opened this issue Jun 2, 2017 · 2 comments

Comments

@acharmat
Copy link

acharmat commented Jun 2, 2017

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

`

@sreejithbs
Copy link

sreejithbs commented Jul 30, 2017

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');

@BippyMiester
Copy link

Issue seems to be resolved. Requesting to close issue. @jacurtis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants