@@ -3,20 +3,20 @@ |
||
3 | 3 | |
4 | 4 | class BMatchesSeeder |
5 | 5 | { |
6 | - function run() |
|
7 | - { |
|
8 | - $teams = \App\Lib\DsManager\Models\Orm\Team::all()->toArray(); |
|
9 | - $halfTheTeams = count($teams) / 2; |
|
10 | - $chunks = array_chunk($teams, $halfTheTeams); |
|
11 | - $teamsSlice1 = $chunks[0]; |
|
12 | - $teamsSlice2 = $chunks[1]; |
|
13 | - for ($i = 0; $i < $halfTheTeams; $i++) { |
|
14 | - \App\Lib\DsManager\Models\Orm\Match::create( |
|
15 | - [ |
|
16 | - 'home_team_id' => $teamsSlice1[$i]['id'], |
|
17 | - 'away_team_id' => $teamsSlice2[$i]['id'] |
|
18 | - ] |
|
19 | - ); |
|
20 | - } |
|
21 | - } |
|
6 | + function run() |
|
7 | + { |
|
8 | + $teams = \App\Lib\DsManager\Models\Orm\Team::all()->toArray(); |
|
9 | + $halfTheTeams = count($teams) / 2; |
|
10 | + $chunks = array_chunk($teams, $halfTheTeams); |
|
11 | + $teamsSlice1 = $chunks[0]; |
|
12 | + $teamsSlice2 = $chunks[1]; |
|
13 | + for ($i = 0; $i < $halfTheTeams; $i++) { |
|
14 | + \App\Lib\DsManager\Models\Orm\Match::create( |
|
15 | + [ |
|
16 | + 'home_team_id' => $teamsSlice1[$i]['id'], |
|
17 | + 'away_team_id' => $teamsSlice2[$i]['id'] |
|
18 | + ] |
|
19 | + ); |
|
20 | + } |
|
21 | + } |
|
22 | 22 | } |
23 | 23 | \ No newline at end of file |