2017-11-22 2 views
-1

문제가 있습니다. 등록이 작동하고, 로그인하지만 로그 아웃 할 때이 오류 얻을 : MethodNotAllowedHttpException - 없음 메시지를MethodNotAllowedHttpException - 메시지 없음

오류 링크 : 로그 아웃 경로 아마도 당신은 GET을 통해/로그 아웃을 호출하는 의미에서 허용되지 http://gazeta1.nazwa.pl/mesiek/error.html

+1

주 샘플 코드, 또는 당신은 https [laravel이 MethodNotAllowedHttpException을 던지는] (의 오류 – carrion

+1

가능한 중복을 준 당신이 노력을 포함하지 않았기 때문에 나는 확실하지 않다 : //stackoverflow.com/questions/19760585/laravel-throwing-methodnotallowedhttpexception) – Camilo

답변

0

방법 요청 (일반/로그 아웃 링크) 인 반면 로그 아웃 요청은 게시물을 통해 호출됩니다. 당신이 실제 로그 아웃이 숨겨진 양식을 통해 호출되는 새로운 프로젝트

<a href="{{ url('logout')}}" onclick="event.preventDefault(); 
document.getElementById('logout-form').submit();"> 
    <i class="icon-key"></i> Log Out 
</a> 
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;"> 
    {{ csrf_field() }} 
</form> 

를 작성하고 링크를 그냥 양식을 제출하면

여기에 기본 laravel 앱에서 로그 아웃 코드입니다.

그러나 당신이 어떤 코드 또는 자세한 내용은 귀하의 질문에

관련 문제