public function put(Category $category) { if ($category->isDirty()) { $category->save(); } return $category; }