|
@@ 221-228 (lines=8) @@
|
| 218 |
|
->whereNotNull('match_id')->get(); |
| 219 |
|
|
| 220 |
|
//for each round get match handicap |
| 221 |
|
$rounds->map(function($round) |
| 222 |
|
{ |
| 223 |
|
$playerMatch = Player::find($round->player_id)->matches()->where('match_player.match_id','=', $round->match_id)->get(); |
| 224 |
|
foreach($playerMatch as $player){ |
| 225 |
|
$handicap = $player['pivot']['handicap']; |
| 226 |
|
$round->handicap = $handicap; |
| 227 |
|
} |
| 228 |
|
}); |
| 229 |
|
//Calculate net score using match handicap |
| 230 |
|
$rounds->map(function($round) |
| 231 |
|
{ |
|
@@ 268-275 (lines=8) @@
|
| 265 |
|
->whereNotNull('match_id')->get(); |
| 266 |
|
|
| 267 |
|
//for each round get match handicap |
| 268 |
|
$rounds->map(function($round) |
| 269 |
|
{ |
| 270 |
|
$playerMatch = Player::find($round->player_id)->matches()->where('match_player.match_id','=', $round->match_id)->get(); |
| 271 |
|
foreach($playerMatch as $player){ |
| 272 |
|
$handicap = $player['pivot']['handicap']; |
| 273 |
|
$round->handicap = $handicap; |
| 274 |
|
} |
| 275 |
|
}); |
| 276 |
|
//Calculate net score using match handicap |
| 277 |
|
$rounds->map(function($round) |
| 278 |
|
{ |