fix artisan.

This commit is contained in:
Taylor Otwell
2012-04-04 16:57:18 -05:00
parent 4bee6d1bca
commit 01a7991bd5
3 changed files with 48 additions and 37 deletions

View File

@@ -2,6 +2,7 @@
use Laravel\Bundle;
use Laravel\Config;
use Laravel\Request;
/**
* Fire up the default bundle. This will ensure any dependencies that
@@ -20,6 +21,16 @@ if (isset($_SERVER['CLI']['DB']))
Config::set('database.default', $_SERVER['CLI']['DB']);
}
/**
* Overwrite the HttpFoundation request since we have set some of
* the server variables since it was created. This allows us to
* set the default database for the CLI task.
*/
use Symfony\Component\HttpFoundation\LaravelRequest as RequestFoundation;
Request::$foundation = RequestFoundation::createFromGlobals();
/**
* We will register all of the Laravel provided tasks inside the IoC
* container so they can be resolved by the task class. This allows