public function update(Request $request, $id)
{
$data = $request->all();
if (!$this->repository->update($id, $data)) {
return $this->response(405, "Validation Errors", $this->repository->getErrors(), 200);
}
return $this->success('Updated Successfully.', $this->repository->getStoredObject());
}