title: laravel soft delete using a form
body: <p>Hi I am trying to soft delete and restore a user using a form, I am using a couple of packages for user auth and roles which are <a href="https://github.com/Zizaco/confide" rel="nofollow">Zizaco Confide</a> and <a href="https://github.com/Zizaco/entrust" rel="nofollow">Zizaco Entrust</a>. I've added the following to the user.php model</p>
  
  <pre><code>use SoftDeletingTrait;
  use ConfideUser;
  use HasRole;
  protected $softDelete = true;
  </code></pre>
  
  <p>and I've run a test as so to test this works:</p>
  
  <pre><code>Route::get('/deleteme', function(){ 
      User::find(2)-&gt;delete();
      return 'done';
  });
  </code></pre>
  
  <p>and this updated the timestamp field, however I want to put this into my controller to neaten things up and give it a form. So I've done this in the table of users:</p>
  
  <pre><code> @if(empty($user-&gt;deleted_at))
             {{Form::open(['method'=&gt;'PATCH','action'=&gt;
              ['UsersController@softDeleteUser',$user-&gt;id]])}}
                &lt;button type="submit"&gt;Suspend&lt;/button&gt;
                {{Form::close()}}  
              @else 
               {{Form::open(['method'=&gt;'delete','action'=&gt;
              ['UsersController@restoreUser',$user-&gt;id]])}}
                  &lt;button type="submit"&gt;Re-activate&lt;/button&gt;
              {{Form::close()}}  
              @endif
  </code></pre>
  
  <p>and in my Controller:</p>
  
  <pre><code>public function softDeleteUser($id){
      $user = User::find($id);
      $user-&gt;delete();
      // redirect
      return Redirect::to('/admin');
  }
  
  public function restoreUser($id) {
      User::find($id)-&gt;restore();        
      $user-&gt;save();
      Redirect::to("/admin");
  }
  </code></pre>
  
  <p>In my routes:</p>
  
  <pre><code>Route::post('/admin/user/{resource}/delete', 
         array('as' =&gt; 'admin.user.delete', 'uses' 
         =&gt;'UsersController@softDeleteUser'));
  Route::post('/admin/user/{resource}/restore', 
        array('as' =&gt; 'admin.user.restore', 
       'uses' =&gt;'UsersController@restoreUser'));
  </code></pre>
  
  <p>However I get this error:</p>
  
  <pre><code>Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException 
  </code></pre>
  
  <p>Any ideas what I'm doing wrong??</p>