This commit is contained in:
salam committed 2026-10-10 12:37:10 +02:00
1 parent fb2d5503f6
commit b89372e0c2
1 file changed
+4 -4
+4 -4
View File
@@ -389,11 +389,11 @@ class PlayerPropsDrop extends Widget
$team_home_away = 'away';
}
$player_totals = SofaScorePlayerPerSeason::with('details')->where('total_min', '>', 0)->where('season', 'last_180_days')->where('ss_team_id', $team_id)->get();
$player_totals = SofaScorePlayerPerSeason::with('details')->where('total_min', '>', 0)->where('season', 'last_180_days')->where('average_min', '>', 0)->where('ss_team_id', $team_id)->get();
$count_player = 0;
foreach ($player_totals as $key => $value) {
if ($value->details != null && $value->details->position != 'GK' && (int) $value->details->is_active != 0) {
if ($value->details != null && $value->details->position != 'GK' && (int) $value->details->is_active) {
$count_player++;
}
}
@@ -401,7 +401,7 @@ class PlayerPropsDrop extends Widget
$results = [];
foreach ($player_totals as $val) {
if ($val->details != null && $val->details->position != 'GK' && (int) $val->details->is_active != 0) {
if ($val->details != null && $val->details->position != 'GK' && (int) $val->details->is_active) {
/***
"goals" => 0
@@ -679,7 +679,7 @@ class PlayerPropsDrop extends Widget
public function prepareLineUp()
{
$players = SofaScorePlayerPerSeason::with('details')->where('season', 'last_180_days')->where('ss_team_id', $this->team_id)->get();
$players = SofaScorePlayerPerSeason::with('details')->where('season', 'last_180_days')->where('ss_team_id', $this->team_id)->where('average_min', '>', 0)->get();
$arr = collect();
foreach ($players as $value) {
if ($value?->details->position ?? 0) {