Forked from christurnertv/1. app-config-local-app.php
Created
April 17, 2014 22:07
-
-
Save icemancast/11014276 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'debug' => true, | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$env = $app->detectEnvironment(array( | |
'local' => array('your-hostname'), | |
)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array( | |
'DB_HOST' => '', | |
'DB_NAME' => '', | |
'DB_USER' => '', | |
'DB_PASS' => '', | |
'EMAIL_USER' => '', | |
'EMAIL_PASS' => '', | |
'STRIPE_SK' => '', | |
'STRIPE_PK' => '', | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
'host' => $_ENV['DB_HOST'], | |
'database' => $_ENV['DB_NAME'], | |
'username' => $_ENV['DB_USER'], | |
'password' => $_ENV['DB_PASS'], | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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