title: How can I send an object using axios?
body: <p>Is there a way to send an object to an API using axios?</p>
  
  <p>This the code I use:</p>
  
  <pre><code>axios.get('/api/phones/create/', {
      parameters: {
          phone: this.phone
      }
  })
      .then(response =&gt; {
          console.log(response.data)
      })
      .catch(function (error) {
          console.log(error)
      })
  </code></pre>
  
  <p>on the php side, I have the following:</p>
  
  <pre><code>public function create($phone)
  {
      return $phone;
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>GET http://crm2.dev/api/phones/create 500 (Internal Server Error)
  dispatchXhrRequest @ app.6007af59798a7b58ff81.js:256
  xhrAdapter @ app.6007af59798a7b58ff81.js:93
  dispatchRequest @ app.6007af59798a7b58ff81.js:662
  app.6007af59798a7b58ff81.js:2266 Error: Request failed with status code 500
      at createError (app.6007af59798a7b58ff81.js:600)
      at settle (app.6007af59798a7b58ff81.js:742)
      at XMLHttpRequest.handleLoad (app.6007af59798a7b58ff81.js:158)
  </code></pre>
  
  <p>If I try, <code>axios.get('/api/phones/create/hello')</code> I get <code>hello</code> in the console log.</p>
  
  <p>Is there a way to do this?</p>