/** * Update the specified Vocabulary in storage. * PUT/PATCH /vocabularies/{id} * * @param int $id * @param Request $request * * @return Response */ public function update($id, Request $request) { $input = $request->all(); /** @var Vocabulary $vocabulary */ $vocabulary = $this->vocabularyRepository->apiFindOrFail($id); $result = $this->vocabularyRepository->update($input, $id); $vocabulary = $vocabulary->fresh(); return $this->sendResponse($vocabulary->toArray(), "Vocabulary updated successfully"); }