Add report() helper function
This commit is contained in:
parent
b6fb15cc10
commit
b047ee8fda
|
|
@ -197,7 +197,7 @@ class AuthController extends Controller
|
|||
Log::info("[Password Reset] Mail has been sent to [{$request->input('email')}] with token [$token]");
|
||||
} catch (\Exception $e) {
|
||||
// Write the exception to log
|
||||
app(\Illuminate\Foundation\Exceptions\Handler::class)->report($e);
|
||||
report($e);
|
||||
|
||||
return json(trans('auth.mail.failed', ['msg' => $e->getMessage()]), 2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -493,3 +493,16 @@ if (! function_exists('get_db_config')) {
|
|||
return config("database.connections.$type");
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('report')) {
|
||||
/**
|
||||
* Report an exception.
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @return void
|
||||
*/
|
||||
function report($exception)
|
||||
{
|
||||
app(Illuminate\Contracts\Debug\ExceptionHandler::class)->report($exception);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user