public function update(Request $request, Application $app, $user_id) { $model = new User($app['neo']); $user = ['id' => $user_id, 'name' => $request->get('name'), 'age' => $request->get('age'), 'country' => $request->get('country'), 'countryCode' => $request->get('countryCode')]; if ($model->update($user)) { return $this->sendJson(['success' => true], 200); } else { return $this->sendJson(['success' => false], 404); } }