Change blog's published status.
public togglePublished ( integer $id ) : boolean | ||
$id | integer | |
Résultat | boolean |
/** * Toggle blog published. * * /admin/blogs/togglePublished/{id} put * * @param integer $id * * @return \Illuminate\Http\JsonResponse */ public function togglePublished($id) { if ($this->blogs->togglePublished($id)) { $message = '博客发布成功'; } else { $message = '博客已保存'; } return $this->responseJson(compact('message')); }