title: Laravel 5.4 - Updating a resource
body: <p>I'm building a blog post to learn Laravel 5.4 and am struggling to find any examples of how to update a Post anywhere.</p>
  
  <p>My form is as follows</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form method="POST" action="/posts/{{ $post-&gt;id }}/edit"&gt;
      {{ csrf_field() }}
  
      &lt;div class="form-group"&gt;
          &lt;label for="title"&gt;Title&lt;/label&gt;
          &lt;input name="title" type="text" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" value="{{ $post-&gt;title }}" required&gt;
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
          &lt;label for="description"&gt;Description&lt;/label&gt;
          &lt;input name="description" type="text" class="form-control" id="exampleInputPassword1" value="{{ $post-&gt;title }}" required&gt;
      &lt;/div&gt;
  
      &lt;div class="form-group"&gt;
          &lt;button type="submit" class="btn btn-primary"&gt;Update&lt;/button&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My Routes are as follows</p>
  
  <pre class="lang-php prettyprint-override"><code>Route::get('/posts/{post}/edit', 'PostsController@edit');
  
  Route::patch('/posts/{post}', 'PostsController@update');
  </code></pre>
  
  <p>And my controller methods are</p>
  
  <pre class="lang-php prettyprint-override"><code>public function edit( Post $post )
  {
      return view('posts.edit', compact('post'));
  }
  
  public function update(Request $request, Post $post )
  {
      Post::where('id', $post)-&gt;update($request-&gt;all());
  
      return redirect('home');
  
  }
  </code></pre>
  
  <p>I get a <code>MethodNotAllowedHTTPException</code> error but am not sure which part / parts of this I am getting wrong.</p>
  
  <p>I'm assuming it must be the point at which I'm using the PATCH function, or potentially just the way I'm mass-assigning the new values. Any help would be greatly appreciated.</p>