path() != 'get_started') { // 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 if (Utils::isNinjaProd() && !Utils::isDownForMaintenance() && !($e instanceof HttpResponseException)) { $data = [ 'error' => get_class($e), 'hideHeader' => true, ]; return response()->view('error', $data); } else { return parent::render($request, $e); } } }