/**
* @param string $middleware
* @param bool $isAjax
* @return \Illuminate\Http\RedirectResponse
*/
protected function failedResponse($middleware, $isAjax = false)
{
if ($isAjax) {
return $this->response->make($this->getErrorMessage($middleware), 403);
}
return $this->redirector->back()->exceptInput('_guard_pot', '_guard_opened')->withErrors($this->getErrorMessage($middleware));
}