title: How to add a custom method to resource controller in Laravel 5.6
body: <p>What is the correct way of adding a custom method to a resource controller in Laravel 5.6?</p>
  
  <p>What I have so far is a new method in my <code>ProfileController</code>:</p>
  
  <pre><code>public function approve($id){
      $user = User::find($id);
      $user-&gt;state = '1';
      $user-&gt;save();
      return redirect('/dashboard')-&gt;with('success', 'User approved.');
  }
  </code></pre>
  
  <p>As well as the following lines added to my <code>web.php</code> file:</p>
  
  <pre><code>Route::post('/profile/{$id}/approve', 'ProfileController@approve');
  Route::resource('profile', 'ProfileController');
  </code></pre>
  
  <p>The form in my view is (afaik) correctly rendered to:</p>
  
  <pre><code>&lt;form method="POST" action="http://myurl.com/profile/10/approve" accept-charset="UTF-8"&gt;
      &lt;input name="_token" type="hidden" value="v3F1RRhi7iJL2o4egOhcRiuahaGQBwkGkfMal1lh"&gt;
      &lt;input name="_method" type="hidden" value="PATCH"&gt;
      &lt;input class="btn btn-success" type="submit" value="Approve User"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Unfortunately nothing happens, except the "Sorry, the page you are looking for could not be found." page to be shown.</p>
  
  <p>What am I missing? And to expand a bit on this question also, is this even a valid way to implement "single field updates" on a db entry?</p>
  
  <p>Thank you for your help!</p>