| 12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace App\Sports\Controller;
- use BaseController\Controller;
- /**
- * Class HomeMatch
- * @package App\Sports\Controller
- * User: tank
- * Date: 2019/3/21
- */
- class HomeMatch extends Controller {
- /**
- * @throws \Exception
- * 获取首页 特色赛事数据
- */
- public function highMatch (){
- $ret = lm("st_zq_competition","Sports")
- ->join('st_zq_league','st_zq_league.id','=','st_zq_competition.lg_id')
- ->select('st_zq_league.id as lg_id','st_zq_league.name_chinese','st_zq_competition.id as match_id','st_zq_competition.home_team','st_zq_competition.guest_team','st_zq_competition.match_date','st_zq_competition.match_time')
- ->limit(3)
- ->where('recommend',1)
- ->get();
- $data = [
- 'title' => '特色赛事',
- 'matchData' => $ret
- ];
- if(!empty($ret)) Render($data, '1', lang('Tips','Sports')->get('success'));
- }
- }
|