コード例 #1
0
 /**
  * Update the visibility of a category
  *
  * @param $id
  * @param Request $request
  * @return \Illuminate\Http\JsonResponse
  */
 public function update($id, Request $request)
 {
     $category = $this->categoryRepository->updateVisibility($id, $request->get('visible'));
     //        if($request->get('visible')) {
     //            $category = $this->categoryRepository->updateVisibility($id, true);
     //        } else {
     //            $category = $this->categoryRepository->updateVisibility($id, false);
     //        }
     return response()->json($category, 200);
 }