public function respondTo($formats) { if (isset($formats['html']) && Controller::wantsHtml()) { return $formats['html']; } else { return $formats['default']; } }
/** * Determine if the session and input CSRF tokens match. * * @param \Illuminate\Http\Request $request * @return bool */ protected function tokensMatch($request) { $tokensMatch = true; if (Controller::wantsHtml()) { $tokensMatch = parent::tokensMatch($request); } return $tokensMatch; }