wip
This commit is contained in:
1 parent
fb2d5503f6
commit
b89372e0c2
1 file changed
+4
-4
@@ -389,11 +389,11 @@ class PlayerPropsDrop extends Widget
|
|||||||
$team_home_away = 'away';
|
$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;
|
$count_player = 0;
|
||||||
foreach ($player_totals as $key => $value) {
|
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++;
|
$count_player++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -401,7 +401,7 @@ class PlayerPropsDrop extends Widget
|
|||||||
$results = [];
|
$results = [];
|
||||||
|
|
||||||
foreach ($player_totals as $val) {
|
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
|
"goals" => 0
|
||||||
@@ -679,7 +679,7 @@ class PlayerPropsDrop extends Widget
|
|||||||
|
|
||||||
public function prepareLineUp()
|
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();
|
$arr = collect();
|
||||||
foreach ($players as $value) {
|
foreach ($players as $value) {
|
||||||
if ($value?->details->position ?? 0) {
|
if ($value?->details->position ?? 0) {
|
||||||
|
|||||||
Reference in new issue
Block a user