| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace App\Http\Controllers\Admin;
- use App\Services\Common\ArticleCategoryService;
- /**
- * 文章分类控制器
- */
- class ArticleCategoryController extends Backend
- {
- public function __construct()
- {
- parent::__construct();
- $this->service = new ArticleCategoryService();
- }
- /**
- * 列表
- */
- public function index()
- {
- $params = request()->all();
- $pageSize = isset($params['limit']) ? intval($params['limit']) : PERPAGE;
- return $this->service->getDataList($params, $pageSize);
- }
- /**
- * 添加/编辑
- */
- public function edit()
- {
- return $this->service->edit();
- }
- /**
- * 删除
- */
- public function delete()
- {
- return $this->service->delete();
- }
- /**
- * 修改状态
- */
- public function status()
- {
- return $this->service->status();
- }
- /**
- * 获取分类选项
- */
- public function options()
- {
- $list = $this->service->options();
- return ['code' => 0, 'data' => $list];
- }
- }
|