title: Array to string conversion error in Laravel
body: <p>I want to use the Queue in Laravel to push messages to a Queue. Therefore I wanted to try out the basic flow first, which throws errors at the moment. </p>
  
  <p>As I am using the CommandBus in Laravel, I created A listener:</p>
  
  <p><strong>Listener - IncidentNotifier.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Listeners;
  
  
  use App\Events\Incident\IncidentWasPosted;
  use App\Events\EventListener;
  use App\Http\Traits\SearchResponder;
  use App\Jobs\SendAlarmToResponder;
  use Illuminate\Foundation\Bus\DispatchesJobs;
  
  class IncidentNotifier extends EventListener {
  
      use DispatchesJobs, SearchResponder;
  
      public function whenIncidentWasPosted(IncidentWasPosted $event) {
          $responders = $this-&gt;getResponderInRange($event);
          $this-&gt;dispatch(new SendAlarmToResponder($responders));
      }
  }
  </code></pre>
  
  <p>This listener should queue a job (not yet done) to use the push notification service as this would block my system at the moment without using Queues.</p>
  
  <p><strong>Job - SendToAlarmResponder.php</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Jobs;
  
  use App\Jobs\Job;
  use Illuminate\Queue\SerializesModels;
  use Illuminate\Queue\InteractsWithQueue;
  use Illuminate\Contracts\Bus\SelfHandling;
  use Illuminate\Contracts\Queue\ShouldQueue;
  
  class SendAlarmToResponder extends Job implements SelfHandling, ShouldQueue
  {
      use InteractsWithQueue, SerializesModels;
  
      protected $responders = array();
  
      public function __construct($responders)
      {
          $this-&gt;$responders = $responders;
      }
  
      public function handle($responders)
      {
          var_dump($responders);
      }
  }
  </code></pre>
  
  <p><strong>searchResponder method</strong></p>
  
  <pre><code>public function getResponderInRange($event) {
      $position[] = array();
      $position['latitude'] = $event-&gt;incident-&gt;latitude;
      $position['longitude'] = $event-&gt;incident-&gt;longitude;
  
      $queryResult = ResponderHelper::searchResponder($position);
      return $queryResult;
  }
  </code></pre>
  
  <p>The responders array is the variable I would like to pass over to the job to be handled there later on. This is an array of objects I received from my Database and works well. But I get the error message:</p>
  
  <pre><code>ErrorException in SendAlarmToResponder.php line 19:
  Array to string conversion
  </code></pre>
  
  <p>How can I hand over this array to the job?</p>