Skip to content

Instantly share code, notes, and snippets.

@beshur
Created April 3, 2014 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beshur/9951830 to your computer and use it in GitHub Desktop.
Save beshur/9951830 to your computer and use it in GitHub Desktop.
laravel error tmp
<?php
App::error(function(Exception $exception, $code)
{
Log::error($exception);
// Save data to the database
$getUser = '';
// ....
if (!Config::get('app.debug')) {
switch ($code)
{
case 404:
// ...
case 500:
if (Request::isJson()) {
return Response::make(null, 500);
}
$layout->content = View::make('errors.500')->with(array(
"exception" => $exception,
"new_error" => $storeError,
"user" => $getUser,
"subject" => $subject
));
return Response::make($layout, 500);
default:
// ...
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment