TP ma mostra sempre il valore come se TP = ALL
This commit is contained in:
1 parent
d0e2f32501
commit
4f7f9f28f1
3 files changed
+36
-6
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Widgets\Boxes\Helper;
|
||||
|
||||
class ExpectationCounting
|
||||
{
|
||||
public static function count(string $team_position, int $team_id, object $res)
|
||||
{
|
||||
$count = 0;
|
||||
foreach ($res as $value) {
|
||||
switch ($team_position) {
|
||||
case 'home':
|
||||
if ($value->home_id == $team_id)
|
||||
$count++;
|
||||
break;
|
||||
case 'away':
|
||||
if ($value->away_id == $team_id)
|
||||
$count++;
|
||||
break;
|
||||
|
||||
default:
|
||||
$count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user