Skip to content

Instantly share code, notes, and snippets.

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