title: axios.patch / axios.put is not working in Vue and Laravel
body: <p>I have this code in my vue file</p>
  
  <pre><code>saveProfile() {
      axios.patch('/api/pegawai/' + this.id, {
           data: this.data
      })
      .then(function (response) {
           console.log(response);
      })
      .catch(function (error) {
           console.log(error);            
      });
  }
  </code></pre>
  
  <p>and in my laravel controller</p>
  
  <pre><code>public function update(Request $request, $id){
       return $this-&gt;sendResponse('request retrieved');
  }
  
  public function sendResponse($message){
      $response = [
          'success' =&gt; true,
          'message' =&gt; $message,
      ];
      return response()-&gt;json($response, 200);
  }
  </code></pre>
  
  <p>when i run the vue file to pass the data to the controller <strong>it should</strong> give me a json response to the browser console with the following value</p>
  
  <pre><code>{
    'success' : true,
    'message' : 'request retrieved'
  }
  </code></pre>
  
  <p>but <strong>currently it gives</strong> me an error <code>500 internal server error</code> through the browser console. I get the same result if I replace <code>axios.patch</code> with <code>axios.put</code>.</p>
  
  <p>--- <em>What I Have Tried</em> ---</p>
  
  <p>I have tried to do <code>axios.post</code> and <code>axios.get</code> with the same scenarios as <code>axios.patch</code> and both working properly. Controller for post and get:</p>
  
  <pre><code>public function store(Request $request){
      return $this-&gt;sendResponse('request retrieved');
  }
  
  public function index(){  
      return $this-&gt;sendResponse('request retrieved');
  }
  </code></pre>