/** * Get Format * * Determines which format to use for output. */ protected function getFormat() { $format = $this->defaultFormat; if (!Request::wantsJson()) { $format = Request::format($format); } return $format; }
/** * Get the data format expected in the response. * * @return string */ public function format($default = 'html') { return parent::format($default); }