| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- // +----------------------------------------------------------------------
- // | Laravel框架 [ Laravel ]
- // +----------------------------------------------------------------------
- // | 版权所有 2017~2021 Laravel研发中心
- // +----------------------------------------------------------------------
- // | 官方网站: http://www.laravel.cn
- // +----------------------------------------------------------------------
- // | Author: wesmiler <12345678@qq.com>
- // +----------------------------------------------------------------------
- namespace App\Http\Controllers\Api\v1;
- use App\Http\Controllers\Api\BaseController;
- use App\Services\BuddhistCatesService;
- use App\Services\BuddhistPagesService;
- use App\Services\BuddhistService;
- /**
- * 佛经管理-控制器
- * @author wesmiler
- * @since 2020/11/11
- * Class BuddhistController
- * @package App\Http\Controllers
- */
- class BuddhistController extends BaseController
- {
- /**
- * 构造函数
- * @author wesmiler
- * @since 2020/11/11
- * BuddhistController constructor.
- */
- public function __construct()
- {
- parent::__construct();
- $this->service = new BuddhistService();
- $this->cateService = new BuddhistCatesService();
- $this->pageService = new BuddhistPagesService();
- }
- /**
- * 书单
- * @return array|mixed
- */
- public function index(){
- $params = request()->all();
- return $this->service->getDataList($params);
- }
- /**
- * 分类
- * @return array
- */
- public function cates(){
- return $this->cateService->getOptions();
- }
- /**
- * 获取章节内容
- */
- public function page(){
- $id = request()->get('id', 0);
- return $this->pageService->getNext($id);
- }
- }
|