1234567891011121314151617181920212223242526 |
- <?php
- namespace app\admin\controller\content;
- use app\controller\Curd;
- use app\model\Content;
- use app\model\SysCategory;
- use support\Request;
- use support\Response;
- class NewsPageController extends Curd{
- public function __construct()
- {
- $this->model = new Content();
- }
- public function select(Request $request) : Response
- {
- $categoryIds = SysCategory::where('category_super_id',61)->select('category_id')->get()->toArray();
- $where['join_content_category_id'] = ['in',$categoryIds];
- [$where, $format, $limit, $field, $order] = $this->selectInput($request);
- $query = $this->doSelect($where, $field, $order);
- return $this->doFormat($query, $format, $limit);
- }
- }
|