| 12345678910111213141516171819202122232425 |
- <?php
- namespace App\Models;
- class Egame_match extends BaseModel {
- protected $table = "egame_match";
- public $timestamps = false;
- //获取赛事信息
- protected function getMatchList($where,$list=10){
- $data=$this->orderBy('id','desc');
- if(is_array($where)&&count($where)>0){
- $data=$data->where($where);
- }
- $data=$data->paginate($list);
- return $data->toArray();
- }
- //获取赛事信息
- protected function getInfoByID($id){
- $data=$this->where('id',$id)->first();
- if(!$data){
- return -9040410122;//没有信息
- }
- return $data->toArray();
- }
- }
|