| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace App\Http\Controllers\Admin;
- use App\Services\Common\ArticleCategoryService;
- use App\Services\Common\JobsCategoryService;
- /**
- * 文章分类控制器
- */
- 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];
- }
- }
|