checklistCategoryService = $checklistCategoryService; } public function index() { $checklistCategories = $this->checklistCategoryService->with(['items']); return response()->json($checklistCategories, 201); } public function store(ChecklistCategoryRequest $request) { $checklistcategory = $this->checklistCategoryService->save($request->all()); return response()->json($checklistcategory, 201); } public function show($id) { $checklistcategory = $this->checklistCategoryService->get($id); return response()->json($checklistcategory); } public function destroy($id) { $this->checklistCategoryService->delete($id); return response()->json(null, 204); } }