mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
Added warning for token mismatch error
This commit is contained in:
parent
19d5d49e63
commit
5547f222e1
@ -46,6 +46,14 @@ class Handler extends ExceptionHandler {
|
||||
{
|
||||
if ($e instanceof ModelNotFoundException) {
|
||||
return Redirect::to('/');
|
||||
} elseif ($e instanceof \Illuminate\Session\TokenMismatchException) {
|
||||
// https://gist.github.com/jrmadsen67/bd0f9ad0ef1ed6bb594e
|
||||
return redirect()
|
||||
->back()
|
||||
->withInput($request->except('password', '_token'))
|
||||
->with([
|
||||
'warning' => trans('texts.token_expired')
|
||||
]);
|
||||
}
|
||||
|
||||
// In production, except for maintenance mode, we'll show a custom error screen
|
||||
|
@ -975,6 +975,6 @@ return array(
|
||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||
|
||||
|
||||
'token_expired' => 'Validation token was expired. Please try again.',
|
||||
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user