/** * Toggle blog toped. * * /admin/blogs/toggleTop/{id} put * * @param integer $id * * @return \Illuminate\Http\JsonResponse */ public function toggleTop($id) { if ($this->blogs->toggleTop($id)) { $message = '博客顶置成功'; } else { $message = '博客取消顶置'; } return $this->responseJson(compact('message')); }