/** * Category detail * * @param $id * * @return \Illuminate\Contracts\Routing\ResponseFactory|mixed */ public function show($id) { $category = $this->categoryService->detail($id); if ($category) { return $this->response->withArray($category); } return $this->response->errorInternalError(); }