Log the exceptions thrown by email service in detail

This commit is contained in:
printempw 2018-07-06 19:00:07 +08:00
parent e1df46b7cd
commit 2a35e83939

View File

@ -195,7 +195,10 @@ class AuthController extends Controller
});
Log::info("[Password Reset] Mail has been sent to [{$request->input('email')}] with token [$token]");
} catch(\Exception $e) {
} catch (\Exception $e) {
// Write the exception to log
app(\Illuminate\Foundation\Exceptions\Handler::class)->report($e);
return json(trans('auth.mail.failed', ['msg' => $e->getMessage()]), 2);
}