123
return view($tpl);
}
public function detail() {
$key = $this->request->param('key', '', 'trim');
$key = explode('_', $key);
$gameId = $key[0];
$data = Db::name('game')->where(['game_id' => $gameId])->find();
if(empty($data)) {
header('location:/');
exit;
}
$tags = explode(',', $data['tags']);
$tagList = [];
$tags = Db::name('tag')->where(['tag_id' => ['in', $tags]])->column('tag_id,name,url_key');
foreach($tags as $tagId=>$value) {
key | [ "7327", "Spider-Stickman-Clash-of-Clans" ] |
gameId | 7327 |
data | Resource |