This commit is contained in:
salam committed 2026-09-15 12:31:02 +02:00
1 parent 0cb9b16bad
commit e19b5ab54b
5 files changed
+14 -4

No files matched your search

+5
View File
@@ -416,6 +416,11 @@ class PlayerPropsDrop extends Widget
// Somma Minuti Giocati da Player (SMG) nel DB // Somma Minuti Giocati da Player (SMG) nel DB
$tmp['somma_minuti'] = $val->total_min; $tmp['somma_minuti'] = $val->total_min;
$tmp['shots_on_target'] = $val->shots_on_target;
$tmp['shots_off_target'] = $val->shots_off_target;
$tmp['shots_blocked'] = $val->shots_blocked;
// il valore corrispondente al ruolo del Player (esempio un giocatore in Details ha ruolo = RW // il valore corrispondente al ruolo del Player (esempio un giocatore in Details ha ruolo = RW
// quindi Aspettativa Statistica (AS) per RW = 0.219) // quindi Aspettativa Statistica (AS) per RW = 0.219)
// exp_goals // exp_goals
+3 -4
View File
@@ -86,10 +86,9 @@ class PlayerCalculator extends Component
// dd($result); // dd($result);
$pos = array_column($result, 'pos'); // $pos = array_column($result, 'pos');
$area = array_column($result, 'area'); // $area = array_column($result, 'area');
// array_multisort($area, SORT_ASC, $pos, SORT_ASC, $result);
array_multisort($area, SORT_ASC, $pos, SORT_ASC, $result);
return $result; return $result;
} }
+1
View File
@@ -25,6 +25,7 @@ class SofaScorePlayerPerSeason extends Model
'offsides', 'offsides',
'shots_on_target', 'shots_on_target',
'shots_off_target', 'shots_off_target',
'shots_blocked',
'total_shots', 'total_shots',
]; ];
+4
View File
@@ -169,6 +169,7 @@ trait UpdateHelper
$collection[$season][$ss_player_id]['offsides'] += $val->offsides; $collection[$season][$ss_player_id]['offsides'] += $val->offsides;
$collection[$season][$ss_player_id]['shots_on_target'] += $val->shots_on_target; $collection[$season][$ss_player_id]['shots_on_target'] += $val->shots_on_target;
$collection[$season][$ss_player_id]['shots_off_target'] += $val->shots_off_target; $collection[$season][$ss_player_id]['shots_off_target'] += $val->shots_off_target;
$collection[$season][$ss_player_id]['shots_blocked'] += $val->shots_blocked;
$collection[$season][$ss_player_id]['total_shots'] += $val->shots_off_target + $val->shots_off_target + $val->shots_blocked; $collection[$season][$ss_player_id]['total_shots'] += $val->shots_off_target + $val->shots_off_target + $val->shots_blocked;
$collection['total'][$ss_player_id]['ss_player_id'] = $ss_player_id; $collection['total'][$ss_player_id]['ss_player_id'] = $ss_player_id;
@@ -183,6 +184,7 @@ trait UpdateHelper
$collection['total'][$ss_player_id]['offsides'] += $val->offsides; $collection['total'][$ss_player_id]['offsides'] += $val->offsides;
$collection['total'][$ss_player_id]['shots_on_target'] += $val->shots_on_target; $collection['total'][$ss_player_id]['shots_on_target'] += $val->shots_on_target;
$collection['total'][$ss_player_id]['shots_off_target'] += $val->shots_off_target; $collection['total'][$ss_player_id]['shots_off_target'] += $val->shots_off_target;
$collection['total'][$ss_player_id]['shots_blocked'] += $val->shots_blocked;
$collection['total'][$ss_player_id]['total_shots'] += $val->shots_off_target + $val->shots_off_target + $val->shots_blocked; $collection['total'][$ss_player_id]['total_shots'] += $val->shots_off_target + $val->shots_off_target + $val->shots_blocked;
} }
} }
@@ -215,6 +217,7 @@ trait UpdateHelper
'offsides', 'offsides',
'shots_on_target', 'shots_on_target',
'shots_off_target', 'shots_off_target',
'shots_blocked',
'total_shots', 'total_shots',
'cards', 'cards',
] ]
@@ -239,6 +242,7 @@ trait UpdateHelper
$collection[$season][$ss_player_id]['offsides'] = 0; $collection[$season][$ss_player_id]['offsides'] = 0;
$collection[$season][$ss_player_id]['shots_on_target'] = 0; $collection[$season][$ss_player_id]['shots_on_target'] = 0;
$collection[$season][$ss_player_id]['shots_off_target'] = 0; $collection[$season][$ss_player_id]['shots_off_target'] = 0;
$collection[$season][$ss_player_id]['shots_blocked'] = 0;
$collection[$season][$ss_player_id]['total_shots'] = 0; $collection[$season][$ss_player_id]['total_shots'] = 0;
$collection[$season][$ss_player_id]['cards'] = 0; $collection[$season][$ss_player_id]['cards'] = 0;
} }
@@ -29,6 +29,7 @@ return new class extends Migration
$table->integer('offsides')->default(0)->nullable(); $table->integer('offsides')->default(0)->nullable();
$table->integer('shots_on_target')->default(0)->nullable(); $table->integer('shots_on_target')->default(0)->nullable();
$table->integer('shots_off_target')->default(0)->nullable(); $table->integer('shots_off_target')->default(0)->nullable();
$table->integer('shots_blocked')->default(0)->nullable();
$table->integer('total_shots')->default(0)->nullable(); $table->integer('total_shots')->default(0)->nullable();
$table->unique(['ss_player_id', 'ss_team_id', 'season']); $table->unique(['ss_player_id', 'ss_team_id', 'season']);
$table->timestamps(); $table->timestamps();