errorResponse($exception->getMessage(), 403); return redirect('/login', 302) ->with('error', 'The form has expired due to inactivity. Please try again'); // redirect()->guest($ex->redirectTo() ?? route('login')); } // if ($ex instanceof AuthorizationException) { // // return $this->errorResponse($exception->getMessage(), 403); // return redirect('/login', 302) // // ->back() // // ->withInput($request->except(['password', 'password_confirmation'])) // ->with('error', 'The form has expired due to inactivity. Please try again'); // } // if ($ex instanceof \Illuminate\Session\TokenMismatchException) { // // return redirect('/login', 302) // // // ->back() // // // ->withInput($request->except(['password', 'password_confirmation'])) // // ->with('error', 'The form has expired due to inactivity. Please try again'); // return response()->json(array( // 'success' => true, // //'redirect' => route('settings.document.edit', ['id' => $dataset->server_state]), // 'redirect' => route('login') // )); // } return parent::render($request, $ex); } }