From 3c1718034d3beb5cb87fdd5f283dd9377b74b6b1 Mon Sep 17 00:00:00 2001 From: Kelt Dockins Date: Thu, 15 May 2014 09:34:03 -0500 Subject: [PATCH] commiting laravel environment setup --- app/routes.php | 12 ++++++++++-- bootstrap/start.php | 6 +++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/routes.php b/app/routes.php index 3e10dcf..7bf85f7 100644 --- a/app/routes.php +++ b/app/routes.php @@ -13,5 +13,13 @@ Route::get('/', function() { - return View::make('hello'); -}); + $user = new User; + $cart = new Cart; + $lineitems = array(); + + $lineitems[] = new Lineitem('item 1337'); + $lineitems[] = new Lineitem('item 231'); + $lineitems[] = new Lineitem('item 432'); + + return $cart->checkout($user, $lineitems); +}); \ No newline at end of file diff --git a/bootstrap/start.php b/bootstrap/start.php index a55def1..a2375c0 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -24,11 +24,11 @@ | */ -$env = $app->detectEnvironment(array( +$env = $app->detectEnvironment(function() { - 'local' => array('your-machine-name'), + return getenv('LARAVEL_ENV') ?: 'production'; -)); +}); /* |--------------------------------------------------------------------------