checkArticle($id); $user = $this->getLoginUser(); $validator = new AppValidator(); $validator->checkOwner($user->id, $article->owner_id); $article->closed = $article->closed == 1 ? 0 : 1; $article->update(); return $article; } }