withArray() 공개 메소드

public withArray ( array $array, array $headers = [] ) : Illuminate\Contracts\Routing\ResponseFactory
$array array
$headers array
리턴 Illuminate\Contracts\Routing\ResponseFactory
 /**
  * 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();
 }