/** * @param $id * @param $attributes * @return bool|mixed * @throws \Grace\Exceptions\Validation\ValidationException */ public function update($id, $attributes) { $this->category = $this->find($id); if ($this->isValid($attributes)) { $this->category->resluggify(); $this->category->fill($attributes)->save(); return true; } throw new ValidationException('Category validation failed', $this->getErrors()); }