123456789101112131415161718192021222324252627 |
- <?php
- namespace App\Services\Pair;
- use App\Models\Fpdx\PairModel;
- use App\Services\Pair\DataModels\PairMatchDataSource;
- class PairFirstMatch extends BasePairMatch
- {
- public function __construct(int $stageId)
- {
- parent::__construct();
- $this->stageId = $stageId;
- }
- public function loadMatchData()
- {
- $datas = PairModel::where([
- array('stage_id', $this->stageId), array('state', '>', 100)
- ])->whereNull('assoc_id')->get()->sortByDesc('score')->toArray();
- $this->dataSources = array_map(function ($data) {
- return new PairMatchDataSource($data);
- }, $datas);
- }
- }
|