1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace DeverService\Manage;
- use Dever;
- use Dever\Data\Service;
- class Data extends Service
- {
- /**
- * 入口
- *
- * @return mixed
- */
- public function handle()
- {
- $data = $this->data();
- //Dever::export($data);die;
- //Dever::debug($data);die;
- return $data;
- }
- /**
- * 写sql
- *
- * @return mixed
- */
- private function data()
- {
- # 同时支持两种形式
- //return Dever::load('manage/admin-all');
- //return $this->query('select id from 3158_manage_admin where id=:0', array(':0' => 1))->fetchAll();//fetch取单个
- //获取批量数据,并且获取分页
- $page['num'] = 2;
- return $this->all('select * FROM 3158_manage_menu', array(), $page);
- }
- }
|