title: Laravel 5.2 validation of PUT/PATCH request on REST controller
body: <p>I have problem with laravel throwing me 405 MethodNotAllowedHttpException.
  I have been trying to add validation on update request to my resource PointController. However validation if its in @update method is ignored(and Point is updated without validation). So by anwsers i found on laracast I created something like this:</p>
  
  <pre><code>class PointRequest extends Request{
  public function authorize()
  {
          return true;
  }
  public function rules()
  {
     switch($this-&gt;method())
      {
      case 'GET':
      case 'DELETE':
      {
       return[];
      }
      case 'POST':
      {
       return [
              'name' =&gt;'required|min:4', 
              'latitude' =&gt; 'required|numeric|unique_with:points,longitude',
              'longitude' =&gt; 'required|numeric'
              ];
      }
      case 'PUT':
      case 'PATCH':
      {
      return [
              'name' =&gt;'required|min:4',
              'latitude' =&gt; 'required|numeric|unique_with:points,longitude',
              'longitude' =&gt; 'required|numeric|unique_with:points,latitude'//will add ignore current row
              ];
      }
       default:break;
      }
  }
  }
  </code></pre>
  
  <p>Sadly it doesn't work. To test my application I am using POSTMAN with x-www-form-urlencoded. General idea of my project is that there is native android app that will communicate with server app (laravel) by jsons. So I don't think this is relevant in my case: </p>
  
  <pre><code>form action="/foo/bar" method="POST" 
  input type="hidden" name="_method" value="PUT"
  </code></pre>
  
  <p>Here is part of PointController</p>
  
  <pre><code>public function update(PointRequest $request, $id)
  {//code//
  </code></pre>
  
  <p>Did I make some grave mistake somewhere? How I can make laravel validate my PUT/PATCH request? It is my first question here so I hope I asked  the right way.</p>