title: Queue actions in Laravel 5
body: <p>I'm creating an application with <strong>Laravel 5</strong> and I have a problem.</p>
  
  <p>I would like to press a button and perform a function in my controller, lets say <strong>doCalculations();</strong> and I want this to execute without letting me wait. </p>
  
  <p>For example:</p>
  
  <p>I press the button.
  The calculation takes 10 seconds.
  I want to be redirected after 1 second but let the calculation finish on the server. </p>
  
  <p>How it is now: I press the button, wait 10 seconds, get redirected. </p>
  
  <p><strong>So, how can I let the function run on the server without letting me wait?</strong></p>
  
  <p><strong>EDIT:</strong> To do this I tried to use a Queue with a command like this:</p>
  
  <p>Command -> doCalculation(); which has a handle function that runs the calculation. and the following is in my controller:</p>
  
  <pre><code> Queue::later(900, new DoCalculation());
   return redirect('/');
  </code></pre>
  
  <p>Still, it will only redirect me after the calculation is done. Even the 900 second wait before the command doesn't work. How can I fix this?</p>