laravel/framework — pull request #3811 by wells (2014-03-06 21:31:46+00:00)
Title: [BugFix] Artisan URL Generation

URLs are merely pointing to the host name in artisan even if the Request is pointing to a subdirectory, when the app running in a subdirectory.

```prepareBaseUrl()``` found in ```Symfony\Component\HttpFoundation\Request``` does not account for console run scripts such as artisan when determining the current baseURL.

This causes ```root()``` found in ```Illuminate\Http\Request``` to return ```$this->getSchemeAndHttpHost()``` and ```$this->getBaseUrl() = ''```

What this means is that something like ```http://hostname``` will be returned for an app running under ```http://hostname/subdir```. My solution sets the base URL to be equal to artisans current request URI.

As a result, ```root()``` found in ```Illuminate\Http\Request``` will return the same string as what ```URL::current()``` supplies when using artisan.