title: How to force laravel to wait until the end job?
body: <p>my function in controller Calling parallel and i create a job for use queue in laravel Because parallel call causing the problem</p>
  
  <p>I create queue as follows : </p>
  
  <pre><code>public function serve($id)
  {
      $this-&gt;dispatch(new OrderServeJob($id));
      return response()-&gt;json(true);
  }
  </code></pre>
  
  <p>and i run:</p>
  
  <pre><code>php artisan queue:work
  </code></pre>
  
  <p>But I have a problem with this method</p>
  
  <p>I want laravel to wait until the queue ends up and then return <code>response()-&gt;json(true)</code></p>
  
  <p>and after redirect user to another address</p>