title: Laravel 5.7 Error message " Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException No message"
body: <p>I have been getting this error all day and cant seem to get it right. my goal is basically to update a user in the admin_users table, in order to change their rolls.</p>
  
  <p>this is the Error.</p>
  
  <blockquote>
    <p>Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException No message Laravel 5.7</p>
  </blockquote>
  
  <p>Web.php</p>
  
  <pre><code>Route::get('/dashboard', 'DashboardController@dashboard');
  Route::post('/admin_users', 'AdminUController@admin_users')-&gt;name('admin_users.update');
  Route::get('/admin_users', 'AdminUController@admin_users')-&gt;name('admin_users');
  </code></pre>
  
  <p>This is the Controller AdminUController.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Post;
  use Mail;
  use Session;
  use Gate;
  use App\Admin_users;
  
  class AdminUController extends Controller
  {
  
      public function admin_users(){
  
          if(!Gate::allows('isUser')){
              if(!Gate::allows('isAdmin')){
                  abort(404,"Sorry, There is nothing to see here!");
              }
         }
  
          // data from users table to be passed to the view
          $admin_users = Admin_users::all();
  
           $title = 'Earn, Invest, Save, and Learn with the Invo App';
           return view('admin_users', ['admin_users' =&gt; $admin_users])-&gt;with('title',$title);
       }
  
       public function update(Request $request, Admin_users $admin_users){
          $admin_users-&gt;email = $request-&gt;email;
          $admin_users-&gt;user_type = $request-&gt;user_type;
          $admin_users-&gt;save();
          session()-&gt;flash('User account has been updated!');
          return redirect()-&gt;back();
       }
  }
  </code></pre>
  
  <p>This is the Model Admin_users.php</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class Admin_users extends Model
  {
      protected $guarded=[];
      //public function admin_users(){
  
     // }
  }
  </code></pre>
  
  <p>This is the blade template admin_users.blade.php</p>
  
  <pre><code>@extends('layouts.app_dashboard')
  @section('content')
  &lt;div class="col-md-12"&gt;
      &lt;div class="margin-top card strpied-tabled-with-hover"&gt;
              &lt;div class="card-header "&gt;
                  &lt;h4 class="card-title"&gt;Invo Admin Users&lt;/h4&gt;
                  &lt;p class="card-category"&gt;Click to edit each user&lt;/p&gt;
                  &lt;a href="{{ route('register') }}" class="btn btn-primary margin-top"&gt;
                          Add New User
                  &lt;/a&gt;
              &lt;/div&gt;
              &lt;div class="card-body table-full-width table-responsive"&gt;
                  &lt;table class="table table-hover table-striped"&gt;
                      &lt;thead&gt;
                          &lt;tr&gt;&lt;th&gt;ID&lt;/th&gt;
                          &lt;th&gt;Name&lt;/th&gt;
                          &lt;th&gt;Email&lt;/th&gt;
                          &lt;th&gt;Password &lt;/th&gt;
                          &lt;th&gt;User Access&lt;/th&gt;
                      &lt;/tr&gt;&lt;/thead&gt;
                      &lt;tbody&gt;
                          @foreach ($admin_users as $user)
                          @if(session()-&gt;has('message'))
                              &lt;div class="alert alert-success"&gt;
                                  {{session()-&gt;get('message')}}
                              &lt;/div&gt;
                          @endif
                          &lt;form method="POST" action="{{route('admin_users.update', $user-&gt;id)}}"&gt;
                           @csrf
                           @method('put')
                          &lt;tr&gt;
                              &lt;td&gt;{{$user-&gt;id}}&lt;/td&gt;
                          &lt;td&gt;{{$user-&gt;name}}&lt;/td&gt;
                              &lt;td&gt;
                                  &lt;input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="{{$user-&gt;email}}"&gt;
                              &lt;/td&gt;
                              &lt;input type="file" class="custom-file-input" value="" placeholder="{{$user-&gt;email}}"&gt;
                              &lt;td&gt;*********&lt;/td&gt;
                              &lt;td&gt;
                                  &lt;select class="selectpicker"&gt;
                                      @if(Auth::id() == $user-&gt;id)
                                          &lt;option selected value="{{$user-&gt;user_type}}"&gt;{{$user-&gt;user_type}}&lt;/option&gt;
                                          &lt;option value="user"&gt;user&lt;/option&gt;
                                      @else
                                          &lt;option selected value="{{$user-&gt;user_type}}"&gt;{{$user-&gt;user_type}}&lt;/option&gt;
                                          &lt;div role="separator" class="dropdown-divider"&gt;&lt;/div&gt;
                                          &lt;a class="dropdown-item" href="#"&gt;Change User Type to&lt;/a&gt;
                                          @if($user-&gt;user_type == 'admin')
                                              &lt;option value="user"&gt;user&lt;/option&gt;
                                          @else
                                              &lt;option value="admin"&gt;admin&lt;/option&gt;
                                          @endif
                                      @endif
  
  
                                  &lt;/select&gt; 
                              &lt;/td&gt;
                              &lt;td&gt;
                                  &lt;button type="submit" class="btn btn-primary"&gt;
                                      Update
                                  &lt;/button&gt;
                              &lt;/td&gt;
                          &lt;/tr&gt;
                          &lt;/form&gt;
                          @endforeach
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      @endsection
  </code></pre>