Skip to content

Instantly share code, notes, and snippets.

@gravitano
Created March 6, 2014 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gravitano/9384195 to your computer and use it in GitHub Desktop.
Save gravitano/9384195 to your computer and use it in GitHub Desktop.
<?php
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name for the host that matches a
| given environment, then we will automatically detect it for you.
|
*/
$env = $app->detectEnvironment(array(
'local' => array('your-machine-name'),
));
// cara simple nya mungkin gini :/
// dicoba aja dulu
$disabled = array('html', 'request');
// kalo mau per environtment, misal cuma pas production
// if($env == 'production'):
foreach($disabled as $ioc)
{
if(isset($app[$ioc]))
{
unset($app[$ioc]);
}
}
// endif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment