Laravel 5 support
Opened this issue · 7 comments
Is there any plan?
The plan is: this week!
I'm waiting for you~~
icedfish: We're doing https://github.com/TheMonkeys/laravel-cachebuster first because it's a bit more complicated. I don't know if that's a good reason. Anyway, that's 90% there. We'll have to pick this up on Monday.
Hi Guys,
Any updates on the L5 version?
Thanks
Hi all,
Sorry about the delay on this.
Turns out L5 changed the way global errors are handled, so we have to change the architecture of how the errors are caught and dealt with in the class. We will still complete this feature request - however at this stage it's looking like it will be sometime in the next 2 weeks.
We've also tagged a release for continued L4 support. Please use "themonkeys/error-emailer" : :"1.*"
. dev-master
will soon cause breaking changes once the L5 version is completed.
Thanks for your patience.
Thanks for making this. I am also looking for a Laravel 5 version. Any update?
For Laravel 5.1, modify your bootstrap/app.php file.
Put this at the top:
use Monolog\Logger;
use Monolog\Handler\MailHandler;`
Then do this right before "return $app;":
$app->configureMonologUsing(function($monolog) {
if ( in_array( getenv('APP_ENV'), array('production') ) ) {
$monolog->pushHandler(
new \Monolog\Handler\NativeMailerHandler(
array('to@email.com', 'also-to@email.com'),
'[Log] Application Exception',
'from@email.com' ,
Logger::ERROR , // set minimal log lvl for mail
true, // bubble to next handler?
70 // max column width in your mail
)
);
}
});
That should send you an email with the stack trace whenever you get an error.