/** * PUT /feed/:id * * @param int $id */ public function editFeed($id) { $feed = new Feed(); if ($feed->read($id)) { $feed->setArray(json_decode($this->app->request()->getBody(), true)); $this->app->render($feed->save() ? 200 : 500, ['response' => $feed->id]); } else { $this->app->render(404); } }