Created
April 3, 2014 10:00
-
-
Save beshur/9951830 to your computer and use it in GitHub Desktop.
laravel error tmp
This file contains 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) | |
{ | |
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