title: Queued route() urls has wrong domain in URL
body: <p>I have a Laravel 5.1 application that has many clients with their own unique subdomains and databases.</p>
  
  <p>On app loading, my middlewares resolves the client and sets the app.url (config/app.php) accordingly. It all works great, in the browser. All urls generated by route() has the correct subdomain for current client.</p>
  
  <p>But, stuff queued (Redis in my case) will always defaults to a domain URL of "localhost".</p>
  
  <p>So if I send a welcome email where the text template contains route('account') it will from the queue generate a "<a href="http://localhost/account" rel="nofollow">http://localhost/account</a>" URL. This is of course not correct.</p>
  
  <p>I've found the line that probably does this, it's in the Illuminate\Foundation\Bootstrap\SetRequestForConsole class:</p>
  
  <pre><code>$url = $app-&gt;make('config')-&gt;get('app.url', 'http://localhost'); &lt;---
  </code></pre>
  
  <p>As far as I can see, I can't really "hook" into anything before that.</p>
  
  <p>Info: For each Queued command (closure) I have, I always send with it who the client is that's queing. That way I set the client before the queued command is fired. It loads the right database connection. But changing the default route() server name appears rather difficult!</p>
  
  <p>I've experimented with extending the UrlGenerator class, but it appears that this is completely ignored for queued commands and only works on HTTP requests.</p>
  
  <p>I've also tried adding this before the queues command is fired: </p>
  
  <pre><code>app('url')-&gt;forceRootUrl($client-&gt;getClientUrl()); 
  </code></pre>
  
  <p>It did not work. (but does work with HTTP requests)</p>
  
  <p>Anyone here have an idea for how to set my own default domain for route() in CLI mode?</p>