Пример #1
0
 public function update($id)
 {
     $this->data['entry'] = Jobs::findOne($id);
     if ($this->request->isPost() || $this->request->isPut()) {
         try {
             $post = $this->request->post();
             $post = Filter::fromSchema($this->schema())->run($post);
             Jobs::update($id, $post);
             h('notification.info', 'Job updated.');
         } catch (\Exception $e) {
             h('notification.error', $e);
         }
     }
 }