title: Logout : MethodNotAllowedHttpException in RouteCollection.php line 233
body: <p>I'm using multi auth for Laravel ... </p>
  
  <p>This is my lougout function for users </p>
  
  <p>LoginController </p>
  
  <pre><code>public function logout()
  {
      Auth::guard('web')-&gt;logout();
      return redirect('/');
  }
  </code></pre>
  
  <p>AdminloginController </p>
  
  <pre><code>public function logout()
  {
      Auth::guard('web')-&gt;logout();
      return redirect('/');
  }
  </code></pre>
  
  <p>This is my route</p>
  
  <pre><code>Route::get('/enseignant/logout', 'Auth\LoginController@Elogout')-&gt;name('enseignant.logout');
  </code></pre>
  
  <p>Route::get('/administration/logout', 'Auth\AdminloginController@logout')->name('admin.logout');</p>
  
  <p>All the methods in the view</p>
  
  <pre><code> &lt;a href="{{ route('admin.logout') }}" class="btn btn-default btn-flat"
     onclick="event.preventDefault();
     document.getElementById('logout-form').submit();"&gt;
     Logout
   &lt;/a&gt;
  
   &lt;form id="logout-form" action="{{ route('admin.logout') }}" method="POST" style="display: none;"&gt;
   {{ csrf_field() }}
   &lt;/form&gt;
  </code></pre>
  
  <p>The function works fine but when I click the button I get this error : </p>
  
  <blockquote>
    <p>MethodNotAllowedHttpException in RouteCollection.php line 233</p>
  </blockquote>