TeamController.php
761 字节
<?php
/**
* Created by PhpStorm.
* User: yhbr
* Date: 2018/9/6
* Time: 14:20
*/
namespace app\admin\controller;
use cmf\controller\AdminBaseController;
use think\Db;
class TeamController extends AdminBaseController
{
public function index()
{
$res = Db::name('team_customization')
->field('id,team_name,team_num,start_time')
->order('start_time DESC')
->paginate(20);
return $this->fetch('', [
'posts' => $res,
'page' => $res->render()
]);
}
public function detail()
{
$info = Db::name('team_customization')->where(['id' => request()->param('id')])->find();
return $this->fetch('', [
'info' => $info
]);
}
}