title: In Laravel, how to control whether a Job should be processed via queue or synchronously
body: <p>I wrote Jobs for most of my "business transactions" which turns out to work quiet well in terms of clean, readable architecture.</p>
  
  <p>In the Job itself, I've to decide whether the Job, once dispatched in my code, should run synchronously or via a queue.</p>
  
  <p>Most of the time I can clearly decide what fits best for a job. Nevertheless, I have situations, where it's important to know, that the task has been fulfilled, before I can continue further processes. Sometimes, it's okay to queue the task because there are no dependencies.</p>
  
  <p>In this situations I'd love being able to control this flow in my code.</p>
  
  <p>For example by doing</p>
  
  <p><code>$this-&gt;dispatch(new MyJob());</code></p>
  
  <p>to use the default way and</p>
  
  <p><code>$this-&gt;queue(new MyJob())</code> or <code>$this-&gt;run(new MyJob())</code> to force either way.</p>
  
  <p>Is that somehow possible, or am I totally confused about this topic?</p>