Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icemancast/11014276 to your computer and use it in GitHub Desktop.
Save icemancast/11014276 to your computer and use it in GitHub Desktop.
<?php
return array(
'debug' => true,
);
$env = $app->detectEnvironment(array(
'local' => array('your-hostname'),
));
<?php
return array(
'DB_HOST' => '',
'DB_NAME' => '',
'DB_USER' => '',
'DB_PASS' => '',
'EMAIL_USER' => '',
'EMAIL_PASS' => '',
'STRIPE_SK' => '',
'STRIPE_PK' => '',
);
<?php
...
'host' => $_ENV['DB_HOST'],
'database' => $_ENV['DB_NAME'],
'username' => $_ENV['DB_USER'],
'password' => $_ENV['DB_PASS'],
...
<?php
// ...
App::error(function(Exception $exception, $code)
{
if (Config::get('app.debug') === true)
{
Log::error($exception);
}
else
{
Log::error($exception->getMessage());
return Response::view('errors.500', array(), 500);
}
});
App::error(function(ModelNotFoundException $e)
{
return Response::view('errors.404', array(), 404);
});
App::missing(function($exception)
{
return Response::view('errors.404', array(), 404);
});
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment