public function show(Author $author) { if (Request::wantsJson()) { return $author; } return view('authors.show', compact('author')); }