I am trying to figure out how I can send errors to my email in Laravel 5. I haven\'t had much luck finding any good resources.
There used to be good packages like: http
Here is the solution for Laravel 5.3
#file: /app/Exceptions/Handler.php
public function report(Exception $e)
{
if($this->shouldReport($e)){
\Mail::send(
['html' => 'error.emails.exception'],
['content' => $data['content']],
function ($m) {
$m->from(['myemail@from.com']);
$m->to(['myemail@to.com']);
$m->subject('Crash Report');
}
);
}
parent::report($e);
}