Skip to content

Instantly share code, notes, and snippets.

@machuga
Created May 6, 2012 13:11
Show Gist options
  • Save machuga/2622285 to your computer and use it in GitHub Desktop.
Save machuga/2622285 to your computer and use it in GitHub Desktop.
Load Laravel app in PHP 5.4 shell
#In your root directory, run php -a:
# Set your $_SERVER['LARAVEL_ENV'], $_SERVER['CLI']['ENV'] or $_SERVER['CLI']['DB'] here
require 'paths.php';
require path('sys').'core.php';
Laravel\Bundle::start(DEFAULT_BUNDLE);
Laravel\Config::set('database.default', $_SERVER['CLI']['DB']);
require path('sys').'cli/dependencies.php';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment