title: "Object of class Symfony\Component\HttpFoundation\ParameterBag could not be converted to string" - What does this error mean and how can I fix it
body: <p>I'm currently creating an application using the Laravel framework and Vue JS.</p>
  
  <p>I have a lot of different 'statuses' e.g. CEO, COO, CFO, Accountant etc. and they all have an ID and a stage_id. My end goal is to use their unique IDs to get their stage IDs and then update their stage IDs to be the same </p>
  
  <p>IMPORTANT: THE $request coming in is in the form of an array of the various status IDs so it could be something like [1,4,6] or even []</p>
  
  <p>This is my controller function:</p>
  
  <pre><code>    public function updateStatuses(Request $request, Stage $stage)
      {
  
      foreach($request as $statusId) {
          Status::forClient()-&gt;findOrFail($statusId)-&gt;update([
              'stage_id' =&gt; $stage-&gt;id,
          ]);
      }
  
      Status::forClient()-&gt;all();
      return Status::all();
      }
  </code></pre>
  
  <p>My axios request:</p>
  
  <pre><code>        changeStatusIds() {
          var self = this;
          axios.put(window.routes["statusroute"].replace('{stage}', this.selectedStage.id), this.selectedStatuses)
              .then(function (response) {
                  console.log(response);
                  self.allStatuses = response.data;
              })
              .catch(function(error){
                  console.error(error);
                  if (!!error.response) console.log(error.response);
              });
      },
  </code></pre>
  
  <p>However, I keep getting the error <strong>"Object of class Symfony\Component\HttpFoundation\ParameterBag could not be converted to string"</strong> which I've never come across before and can't seem to debug. Given my current code, how can I fix this?</p>