예제 #1
0
 /**
  * Update the specified Batch in storage.
  * PUT/PATCH /batches/{id}
  *
  * @param  int              $id
  * @param Request $request
  *
  * @return Response
  */
 public function update($id, Request $request)
 {
     $input = $request->all();
     /** @var Batch $batch */
     $batch = $this->batchRepository->apiFindOrFail($id);
     $result = $this->batchRepository->update($input, $id);
     $batch = $batch->fresh();
     return $this->sendResponse($batch->toArray(), "Batch updated successfully");
 }