Last active
February 27, 2019 14:14
-
-
Save raank/d883c12956dc62dc7e112e7541b6a6b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Faz o forecah em SP, passa o '2nd_half_result' para $hotfixArr e depois faz um foreach em $hotfixArr | |
*/ | |
foreach($rs->half->sp as $hotfixKey => $hotfixArr) { | |
if (str_contains($hotfixKey, '2nd_half_result')) { // hotfix sintax | |
foreach($hotfixArr as $nd_half_result) { | |
if($nd_half_result->opp == 1){ | |
$od = "Casa (2T)"; | |
} | |
if($nd_half_result->opp == 'X'){ | |
$od = "Empate (2T)"; | |
} | |
if($nd_half_result->opp == 2){ | |
$od = "Fora (2T)"; | |
} | |
$odd = Odd::create([ | |
'mercado_id' => $mercado_id, | |
'match_id' => $match_id, | |
'mercado_name' => 'Vencedor do Encontro (2T)', | |
'odd' => $od , | |
'cotacao' => $nd_half_result->odds, | |
'status' => 1, | |
]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment