public function updateTemplate($template_id, $template) { $object = $this->getById($template_id); if ($object == null) { \App::abort(404); } $object->fill(array('display_title' => $template->display_title, 'title' => $template->title, 'tags' => $template->tags, 'body' => $template->body)); $object->save(); return $object; }