| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace App\Models;
- class JisuGameplay extends BaseModel
- {
- protected $table = 'jisu_gameplay';
- protected $fillable = [ 'game', 'game_en', 'gameplay', 'gameplay_en', 'number', 'number_en', 'odds','type','maxinum','mininum'];
-
- public static function getGame($type) {
- $list = JisuGameplay::where('type',$type)->select()->toArray();
- $tree = [];
- foreach($list as $k => $item) {
- if (!isset($tree[$item['game']])) {
- $tree[$item['game']] = [
- 'name' => $item['game'],
- 'name_en' => $item['game_en'],
- ];
- }
- if (!isset($tree[$item['game']]['children'][$item['gameplay']])) {
- $tree[$item['game']]['children'][$item['gameplay']] = [
- 'name' => $item['gameplay'],
- 'name_en' => $item['gameplay_en'],
- ];
- }
- $tree[$item['game']]['children'][$item['gameplay']]['children'][] = [
- 'name' => $item['number'],
- 'name_en' => $item['number_en'],
- 'odds' => $item['odds'],
- 'maxinum' => $item['maxinum'],
- 'mininum' => $item['mininum'],
- ];
- }
- $tree = array_values($tree);
- foreach ($tree as $k=> &$item) {
-
- $item['children'] = array_values($item['children']);
-
- }
- return ($tree);
- }
- public static function getRemark($type) {
- if ($type == 1) {
- return '极速赛车';
- } elseif ($type == 2) {
- return '极速时时彩';
- } elseif ($type == 3) {
- return '3极速飞艇';
- }
- }
- }
|