From c1892e86aa505d162adb72ab838b9ba8c29d716e Mon Sep 17 00:00:00 2001 From: salam Date: Tue, 28 Jul 2026 21:37:18 +0200 Subject: [PATCH] modifications details --- app/Actions/Selections/LoadPlayer.php | 21 ++++------ .../Grapper/Sofascore/PlayerPerSeason.php | 8 ++-- .../Schemas/StatistikoDetailForm.php | 16 +++----- .../StatistikoDetailResource.php | 2 +- .../Tables/StatistikoDetailsTable.php | 20 ++++----- .../Schemas/StatistikoPlayerForm.php | 2 +- .../Tables/StatistikoPlayersTable.php | 2 +- app/Filament/Imports/Helper/ImportDetails.php | 41 +++++++++++-------- app/Filament/Imports/Helper/ImportPlayer.php | 2 +- app/Filament/Pages/Statistic.php | 16 ++++---- app/Filament/Widgets/Data/LoadEvents.php | 8 ++-- app/Filament/Widgets/Data/LoadPlayer.php | 8 ++-- .../Widgets/Data/LoadPlayerPerformance.php | 8 ++-- app/Models/SofaScorePlayerPerSeason.php | 4 +- app/Models/StatistikoDetail.php | 20 ++++----- app/Models/StatistikoPlayer.php | 2 - .../2026_04_20_085306_mongo_details.php | 4 +- .../2026_04_20_145257_mongo_players.php | 1 - ...te_sofa_score_player_per_seasons_table.php | 2 +- .../views/filament/pages/statistic.blade.php | 18 ++++---- textfiles/markatires_filds.txt | 2 +- 21 files changed, 99 insertions(+), 108 deletions(-) diff --git a/app/Actions/Selections/LoadPlayer.php b/app/Actions/Selections/LoadPlayer.php index d5a85751..e1edb6e3 100644 --- a/app/Actions/Selections/LoadPlayer.php +++ b/app/Actions/Selections/LoadPlayer.php @@ -11,13 +11,13 @@ class LoadPlayer public static function load(Get $get) { $team_id = $get('team_id'); - + $season = $get('season'); $team_position = $get('team_position'); $season_or_date = $filter['season_or_date'] ?? 'season'; - if($season_or_date != 'season' or !count($season)) { + if ($season_or_date != 'season' or !count($season)) { $season[] = date('Y'); } @@ -52,20 +52,17 @@ class LoadPlayer break; } - $colorlevel = round($matches_count/3); + $colorlevel = round($matches_count / 3); $position = strtoupper($val->details->position); - if($events_played < $colorlevel){ - $arr[$position][$val->tm_player_id] = ''.$val->details->name.' ('.$events_played.')'; + if ($events_played < $colorlevel) { + $arr[$position][$val->ss_player_id] = '' . $val->details->name . ' (' . $events_played . ')'; + } else if ($events_played < $colorlevel * 2) { + $arr[$position][$val->ss_player_id] = '' . $val->details->name . ' (' . $events_played . ')'; + } else { + $arr[$position][$val->ss_player_id] = '' . $val->details->name . ' (' . $events_played . ')'; } - else if($events_played < $colorlevel*2){ - $arr[$position][$val->tm_player_id] = ''.$val->details->name.' ('.$events_played.')'; - } - else { - $arr[$position][$val->tm_player_id] = ''.$val->details->name.' ('.$events_played.')'; - } - } return $arr; } diff --git a/app/Console/Commands/Grapper/Sofascore/PlayerPerSeason.php b/app/Console/Commands/Grapper/Sofascore/PlayerPerSeason.php index a2ae7e25..95afaeb1 100644 --- a/app/Console/Commands/Grapper/Sofascore/PlayerPerSeason.php +++ b/app/Console/Commands/Grapper/Sofascore/PlayerPerSeason.php @@ -14,7 +14,7 @@ class PlayerPerSeason { $debug = Nuh::$options['d'] ?? 0; - $res = StatistikoDetail::query()->select('tm_player_id', 'txodds_id')->get(); + $res = StatistikoDetail::query()->select('ss_player_id', 'txodds_id')->get(); if ($debug) { Notice::note('process ' . $res->count() . " player", 'bb'); @@ -24,7 +24,7 @@ class PlayerPerSeason $collection = []; - $res2 = StatistikoPlayer::with('event')->where('tm_player_id', $val->tm_player_id)->get(); + $res2 = StatistikoPlayer::with('event')->where('ss_player_id', $val->ss_player_id)->get(); foreach ($res2 as $val2) { @@ -46,10 +46,10 @@ class PlayerPerSeason } foreach ($collection as $season => $row) { - if ($val->txodds_id && $val->tm_player_id) { + if ($val->txodds_id && $val->ss_player_id) { SofaScorePlayerPerSeason::updateOrCreate( [ - 'tm_player_id' => $val->tm_player_id, + 'ss_player_id' => $val->ss_player_id, 'tx_team_id' => $val->txodds_id, 'season' => $season ], diff --git a/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/Schemas/StatistikoDetailForm.php b/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/Schemas/StatistikoDetailForm.php index e7b6ba7c..acd9cfb0 100644 --- a/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/Schemas/StatistikoDetailForm.php +++ b/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/Schemas/StatistikoDetailForm.php @@ -17,21 +17,17 @@ class StatistikoDetailForm 'default' => 2, 'xl' => 4, ])->schema([ - TextInput::make('tm_player_id')->required(), - TextInput::make('name')->required(), - TextInput::make('full_name'), + TextInput::make('ss_player_id')->required(), + TextInput::make('player_name')->required(), DatePicker::make('birthdate'), TextInput::make('height'), TextInput::make('nationality'), TextInput::make('position'), - TextInput::make('sport_radar_id'), - TextInput::make('id_squadra_tm'), - TextInput::make('rigorist'), - TextInput::make('national_team_id'), - DatePicker::make('last_update'), - TextInput::make('league_code'), - TextInput::make('team_code'), + TextInput::make('ss_national_team_id'), + TextInput::make('tx_team_id'), TextInput::make('team_name'), + TextInput::make('preferred_foot'), + DatePicker::make('last_update'), ]), ])->columns(1); } diff --git a/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/StatistikoDetailResource.php b/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/StatistikoDetailResource.php index 07840e62..40287fe1 100644 --- a/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/StatistikoDetailResource.php +++ b/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/StatistikoDetailResource.php @@ -26,7 +26,7 @@ class StatistikoDetailResource extends Resource protected static ?int $navigationSort = 4; - protected static ?string $recordTitleAttribute = 'giocatore'; + protected static ?string $recordTitleAttribute = 'player_name'; public static function form(Schema $schema): Schema { diff --git a/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/Tables/StatistikoDetailsTable.php b/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/Tables/StatistikoDetailsTable.php index 91ca4e68..57d8c113 100644 --- a/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/Tables/StatistikoDetailsTable.php +++ b/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/Tables/StatistikoDetailsTable.php @@ -24,23 +24,19 @@ class StatistikoDetailsTable ->paginationPageOptions([8, 16, 24, 36]) ->columns([ Stack::make([ - TextColumn::make('tm_player_id')->prefix('Id: ')->searchable()->color('success')->icon('phosphor-copy')->copyable(), - TextColumn::make('name')->searchable()->prefix('Name: ')->color('primary')->icon('phosphor-copy')->copyable(), - TextColumn::make('full_name')->color('gray')->searchable(), + TextColumn::make('ss_player_id')->prefix('Id: ')->searchable()->color('success')->icon('phosphor-copy')->copyable(), + TextColumn::make('player_name')->searchable()->prefix('Name: ')->color('primary')->icon('phosphor-copy')->copyable(), TextColumn::make('birthdate')->date()->prefix('Birthdate: '), TextColumn::make('height')->prefix('Height: ')->suffix(' cm'), TextColumn::make('nationality')->prefix('Nationality: '), TextColumn::make('position')->prefix('Position: '), - TextColumn::make('sport_radar_id')->searchable()->prefix('Sport Radar Id: ')->icon('phosphor-copy')->copyable(), - TextColumn::make('id_squadra_tm')->prefix('Team Id TM: '), - TextColumn::make('rigorist')->prefix('Rigorist: '), - TextColumn::make('national_team_id')->prefix('National Team Id: '), + TextColumn::make('ss_national_team_id')->prefix('National Team Id: '), + TextColumn::make('tx_team_id')->prefix('Team Id: '), + TextColumn::make('team_name')->prefix('Team Name: '), + TextColumn::make('preferred_foot')->prefix('Preferred Foot: '), TextColumn::make('last_update')->date()->prefix('Last Update: '), TextColumn::make('created_at')->date()->prefix('Created: '), TextColumn::make('updated_at')->date()->prefix('Updated: '), - // TextColumn::make('league_code')->prefix('League: '), - // TextColumn::make('team_code')->prefix('Team Code: '), - // TextColumn::make('team_name')->prefix('Team Name: '), ]), ]) ->emptyStateHeading('No double player in details') @@ -56,12 +52,12 @@ class StatistikoDetailsTable return $query->when( $data['find_double'], function (Builder $query) { - $pDetails = StatistikoDetail::pluck('tm_player_id')->toArray(); + $pDetails = StatistikoDetail::pluck('ss_player_id')->toArray(); $doublpDetails = array_diff_assoc( $pDetails, array_unique($pDetails) ); - $query->whereIn('tm_player_id', $doublpDetails)->orderBy('tm_player_id'); + $query->whereIn('ss_player_id', $doublpDetails)->orderBy('ss_player_id'); } ); })->indicateUsing(function (array $data): ?string { diff --git a/app/Filament/Clusters/StaticData/Resources/StatistikoPlayers/Schemas/StatistikoPlayerForm.php b/app/Filament/Clusters/StaticData/Resources/StatistikoPlayers/Schemas/StatistikoPlayerForm.php index 93e457d6..751d7977 100644 --- a/app/Filament/Clusters/StaticData/Resources/StatistikoPlayers/Schemas/StatistikoPlayerForm.php +++ b/app/Filament/Clusters/StaticData/Resources/StatistikoPlayers/Schemas/StatistikoPlayerForm.php @@ -19,7 +19,7 @@ class StatistikoPlayerForm TextInput::make('sport_id'), TextInput::make('match_id'), TextInput::make('ss_player_id'), - TextInput::make('tm_player_id'), + TextInput::make('ss_player_id'), TextInput::make('activeteam_id'), TextInput::make('playersubstitute_id'), TextInput::make('goals'), diff --git a/app/Filament/Clusters/StaticData/Resources/StatistikoPlayers/Tables/StatistikoPlayersTable.php b/app/Filament/Clusters/StaticData/Resources/StatistikoPlayers/Tables/StatistikoPlayersTable.php index f0e8dfca..ae81b97f 100644 --- a/app/Filament/Clusters/StaticData/Resources/StatistikoPlayers/Tables/StatistikoPlayersTable.php +++ b/app/Filament/Clusters/StaticData/Resources/StatistikoPlayers/Tables/StatistikoPlayersTable.php @@ -25,7 +25,7 @@ class StatistikoPlayersTable ->label('Player') ->searchable() ->tooltip(fn($record) => $record->details->full_name), - TextColumn::make('tm_player_id')->label('TM Id')->searchable(), + TextColumn::make('ss_player_id')->label('TM Id')->searchable(), TextColumn::make('ss_player_id')->label('SS Id')->searchable(), TextColumn::make('event.home.name')->searchable()->color('primary'), TextColumn::make('event.away.name')->searchable()->color('success'), diff --git a/app/Filament/Imports/Helper/ImportDetails.php b/app/Filament/Imports/Helper/ImportDetails.php index dac60185..f296bdda 100644 --- a/app/Filament/Imports/Helper/ImportDetails.php +++ b/app/Filament/Imports/Helper/ImportDetails.php @@ -24,26 +24,35 @@ class ImportDetails if ($row[1] != '') { + // 'ss_player_id', + // 'player_name', + // 'tx_team_id', + // 'ss_national_team_id', + // 'team_name', + // 'birthday', + // 'height', + // 'nationality', + // 'position', + // 'preferred_foot', + // 'last_update', + // 'created_at', + // 'updated_at', + StatistikoDetail::updateOrCreate( [ - 'tm_player_id' => (int) $row[0], + 'ss_player_id' => (int) $row[0], ], [ - 'name' => $row[1], - 'birthdate' => Carbon::parse($row[2])->toDateString(), - 'height' => $row[3], - 'nationality' => $row[4], - 'position' => $row[5], - 'sport_radar_id' => $row[6], - 'id_squadra_tm' => $row[7], - 'full_name' => $row[8], - 'no_specialities' => $row[9], - 'txodds_id' => $row[10], - 'national_team_id' => $row[11], - 'last_update' => Carbon::parse($row[12])->toDateString(), - 'league_code' => $row[13], - 'team_code' => $row[14], - 'team_name' => $row[15], + 'player_name' => $row[1], + 'tx_team_id' => $row[2], + 'ss_national_team_id' => $row[3], + 'team_name' => $row[4], + 'birthdate' => Carbon::parse($row[5])->toDateString(), + 'height' => $row[6], + 'nationality' => $row[7], + 'position' => $row[8], + 'preferred_foot' => $row[9], + 'last_update' => Carbon::parse($row[10])->toDateString(), 'created_at' => $now, 'updated_at' => $now, ] diff --git a/app/Filament/Imports/Helper/ImportPlayer.php b/app/Filament/Imports/Helper/ImportPlayer.php index 24330bab..f37142ca 100644 --- a/app/Filament/Imports/Helper/ImportPlayer.php +++ b/app/Filament/Imports/Helper/ImportPlayer.php @@ -77,7 +77,7 @@ class ImportPlayer 'penaltyshoutout_missed', 'player_position', 'playerrating_value', - 'tm_player_id' + 'ss_player_id' ]; SimpleExcelReader::create(storage_path('app/public/' . $filePath)) diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index 9b2a87e7..a052e782 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -73,7 +73,7 @@ class Statistic extends BaseDashboard ->afterStateUpdated(function (callable $set, $state) { $set('match_id', null); $set('team_id', null); - $set('tm_player_id', null); + $set('ss_player_id', null); $set('season', null); }), Select::make('match_id') @@ -86,7 +86,7 @@ class Statistic extends BaseDashboard }) ->afterStateUpdated(function (callable $set) { $set('team_id', null); - $set('tm_player_id', null); + $set('ss_player_id', null); }) ->placeholder('Events'), @@ -116,7 +116,7 @@ class Statistic extends BaseDashboard } }) ->afterStateUpdated(function (callable $set) { - $set('tm_player_id', null); + $set('ss_player_id', null); }) ->placeholder('Team'), @@ -140,7 +140,7 @@ class Statistic extends BaseDashboard 'away' => 'Away', ])->afterStateUpdated(function (callable $set) { // $set('team_id', null); - $set('tm_player_id', null); + $set('ss_player_id', null); }), ]), Grid::make([ @@ -196,7 +196,7 @@ class Statistic extends BaseDashboard ->selectablePlaceholder(false) ->afterStateUpdated(function (callable $set) { $set('team_id', null); - $set('tm_player_id', null); + $set('ss_player_id', null); $set('team_position', null); }) ->options([ @@ -218,7 +218,7 @@ class Statistic extends BaseDashboard ->pipsFormatter(RawJs::make(<<<'JS' `${$value.toFixed(2)}` JS)), - Select::make('tm_player_id') + Select::make('ss_player_id') ->live() ->hiddenLabel() ->allowHtml() @@ -237,12 +237,12 @@ class Statistic extends BaseDashboard ->placeholder('Time on field') ->prefixIcon('phosphor-watch-fill') ->default('all') - ->hidden(fn(Get $get) => ! $get('tm_player_id')) + ->hidden(fn(Get $get) => ! $get('ss_player_id')) ->prefixIconColor('success') ->selectablePlaceholder(false) // ->afterStateUpdated(function (callable $set) { // // $set('team_id', null); - // $set('tm_player_id', null); + // $set('ss_player_id', null); // }) ->options([ 'all' => 'All', diff --git a/app/Filament/Widgets/Data/LoadEvents.php b/app/Filament/Widgets/Data/LoadEvents.php index f868401d..9424da63 100644 --- a/app/Filament/Widgets/Data/LoadEvents.php +++ b/app/Filament/Widgets/Data/LoadEvents.php @@ -24,7 +24,7 @@ class LoadEvents $season = $filter['season'] ?? 0; - $tm_player_id = (int) $filter['tm_player_id'] ?? 0; + $ss_player_id = (int) $filter['ss_player_id'] ?? 0; $start = $filter['start_date'] ?? 0; @@ -97,7 +97,7 @@ class LoadEvents $matches_played = []; $description = ''; - if ($tm_player_id) { + if ($ss_player_id) { $matches_season = StatistikoEvent::where(function ($query) use ($team_id, $team_position) { switch ($team_position) { @@ -113,7 +113,7 @@ class LoadEvents $matches_played = StatistikoPlayer::query() ->whereIn('match_id', $matches_season) - ->where('tm_player_id', $tm_player_id) + ->where('ss_player_id', $ss_player_id) ->when($player_on_field, function ($query) use ($player_on_field) { // 'all' => 'All', // 'lineup' => 'Lineup', @@ -132,7 +132,7 @@ class LoadEvents }) ->pluck('match_id')->toArray(); - $description = ' with ' . StatistikoDetail::where('tm_player_id', (int) $tm_player_id)->value('name') . ' (' . \count($matches_played) . ')'; + $description = ' with ' . StatistikoDetail::where('ss_player_id', (int) $ss_player_id)->value('name') . ' (' . \count($matches_played) . ')'; if (! $matches_played) { $matches_played[] = -1; diff --git a/app/Filament/Widgets/Data/LoadPlayer.php b/app/Filament/Widgets/Data/LoadPlayer.php index 30018394..81400571 100644 --- a/app/Filament/Widgets/Data/LoadPlayer.php +++ b/app/Filament/Widgets/Data/LoadPlayer.php @@ -22,7 +22,7 @@ class LoadPlayer $team_id = (int) $filter['team_id'] ?? 0; - $tm_player_id = (int) $filter['tm_player_id'] ?? 0; + $ss_player_id = (int) $filter['ss_player_id'] ?? 0; $start = $filter['start_date'] ?? 0; @@ -38,7 +38,7 @@ class LoadPlayer if (! $team_id) { return []; } - if (! $tm_player_id) { + if (! $ss_player_id) { return []; } @@ -46,9 +46,9 @@ class LoadPlayer $statistic_type = 'gls'; } - $player_name = StatistikoDetail::where('tm_player_id', (int) $tm_player_id)->value('name'); + $player_name = StatistikoDetail::where('ss_player_id', (int) $ss_player_id)->value('name'); - $res = StatistikoPlayer::with('event')->where('tm_player_id', (int) $tm_player_id)->get(); + $res = StatistikoPlayer::with('event')->where('ss_player_id', (int) $ss_player_id)->get(); $labels = []; $datasets = []; diff --git a/app/Filament/Widgets/Data/LoadPlayerPerformance.php b/app/Filament/Widgets/Data/LoadPlayerPerformance.php index 3c8a9719..9377ce21 100644 --- a/app/Filament/Widgets/Data/LoadPlayerPerformance.php +++ b/app/Filament/Widgets/Data/LoadPlayerPerformance.php @@ -20,7 +20,7 @@ class LoadPlayerPerformance $team_id = (int) $filter['team_id'] ?? 0; - $tm_player_id = (int) $filter['tm_player_id'] ?? 0; + $ss_player_id = (int) $filter['ss_player_id'] ?? 0; $statistic_type = $filter['statistic_type'] ?? 'gls'; @@ -32,18 +32,18 @@ class LoadPlayerPerformance if (! $team_id) { return []; } - if (! $tm_player_id) { + if (! $ss_player_id) { return []; } - $player_name = StatistikoDetail::where('tm_player_id', (int) $tm_player_id)->value('name'); + $player_name = StatistikoDetail::where('ss_player_id', (int) $ss_player_id)->value('name'); if ($statistic_type == 'none') { $statistic_type = 'gls'; } $matches_played = StatistikoPlayer::with('event') - ->where('tm_player_id', (int) $tm_player_id) + ->where('ss_player_id', (int) $ss_player_id) ->when($player_on_field, function ($query) use ($player_on_field) { switch ($player_on_field) { case 'lineup': diff --git a/app/Models/SofaScorePlayerPerSeason.php b/app/Models/SofaScorePlayerPerSeason.php index 4fe4bc80..74372fb8 100644 --- a/app/Models/SofaScorePlayerPerSeason.php +++ b/app/Models/SofaScorePlayerPerSeason.php @@ -7,7 +7,7 @@ use Illuminate\Database\Eloquent\Model; class SofaScorePlayerPerSeason extends Model { protected $fillable = [ - 'tm_player_id', + 'ss_player_id', 'tx_team_id', 'season', 'events_played_home', @@ -18,6 +18,6 @@ class SofaScorePlayerPerSeason extends Model public function details() { - return $this->belongsTo(StatistikoDetail::class, 'tm_player_id', 'tm_player_id'); + return $this->belongsTo(StatistikoDetail::class, 'ss_player_id', 'ss_player_id'); } } diff --git a/app/Models/StatistikoDetail.php b/app/Models/StatistikoDetail.php index 381293c6..7b023104 100644 --- a/app/Models/StatistikoDetail.php +++ b/app/Models/StatistikoDetail.php @@ -13,21 +13,17 @@ class StatistikoDetail extends Model protected $table = 'details'; protected $fillable = [ - 'tm_player_id', - 'name', - 'full_name', - 'birthdate', + 'ss_player_id', + 'player_name', + 'tx_team_id', + 'ss_national_team_id', + 'team_name', + 'birthday', 'height', 'nationality', 'position', - 'sport_radar_id', - 'id_squadra_tm', - 'rigorist', - 'national_team_id', + 'preferred_foot', 'last_update', - 'league_code', - 'team_code', - 'team_name', 'created_at', 'updated_at', ]; @@ -42,6 +38,6 @@ class StatistikoDetail extends Model public function season() { - return $this->hasMany(SofaScorePlayerPerSeason::class, 'tm_player_id', 'tm_player_id'); + return $this->hasMany(SofaScorePlayerPerSeason::class, 'ss_player_id', 'ss_player_id'); } } diff --git a/app/Models/StatistikoPlayer.php b/app/Models/StatistikoPlayer.php index 2dc2f788..aac630b9 100644 --- a/app/Models/StatistikoPlayer.php +++ b/app/Models/StatistikoPlayer.php @@ -14,7 +14,6 @@ class StatistikoPlayer extends Model 'sport_id', 'match_id', 'ss_player_id', - 'tm_player_id', 'activeteam_id', 'playersubstitute_id', 'goals', @@ -72,7 +71,6 @@ class StatistikoPlayer extends Model 'subtype_event_during_the_match', 'player_position', 'playerrating_value', - 'tm_player_id', ]; public function event() diff --git a/database/migrations/2026_04_20_085306_mongo_details.php b/database/migrations/2026_04_20_085306_mongo_details.php index 8511ccd2..d9891c01 100644 --- a/database/migrations/2026_04_20_085306_mongo_details.php +++ b/database/migrations/2026_04_20_085306_mongo_details.php @@ -14,8 +14,8 @@ return new class extends Migration public function up(): void { Schema::create('details', function (Blueprint $collection) { - $collection->unique('tm_player_id'); - $collection->index('name'); + $collection->unique('ss_player_id'); + $collection->index('player_name'); }); } diff --git a/database/migrations/2026_04_20_145257_mongo_players.php b/database/migrations/2026_04_20_145257_mongo_players.php index 5b911d57..5c01265a 100644 --- a/database/migrations/2026_04_20_145257_mongo_players.php +++ b/database/migrations/2026_04_20_145257_mongo_players.php @@ -16,7 +16,6 @@ return new class extends Migration Schema::create('players', function (Blueprint $collection) { $collection->index('match_id'); $collection->index('ss_player_id'); - $collection->index('tm_player_id'); }); } diff --git a/database/migrations/2026_06_27_091506_create_sofa_score_player_per_seasons_table.php b/database/migrations/2026_06_27_091506_create_sofa_score_player_per_seasons_table.php index 8c719bcd..b6fa3c97 100644 --- a/database/migrations/2026_06_27_091506_create_sofa_score_player_per_seasons_table.php +++ b/database/migrations/2026_06_27_091506_create_sofa_score_player_per_seasons_table.php @@ -13,7 +13,7 @@ return new class extends Migration { Schema::create('sofa_score_player_per_seasons', function (Blueprint $table) { $table->id(); - $table->integer('tm_player_id')->index(); + $table->integer('ss_player_id')->index(); $table->integer('tx_team_id')->index(); $table->string('season')->index(); $table->integer('events_played_home')->default(0)->nullable(); diff --git a/resources/views/filament/pages/statistic.blade.php b/resources/views/filament/pages/statistic.blade.php index c61c205e..cb688409 100644 --- a/resources/views/filament/pages/statistic.blade.php +++ b/resources/views/filament/pages/statistic.blade.php @@ -1,8 +1,8 @@ @php - $player_name = App\Models\StatistikoDetail::where('tm_player_id', (int) $this->filters['tm_player_id'])->value('name'); +$player_name = App\Models\StatistikoDetail::where('ss_player_id', (int) $this->filters['ss_player_id'])->value('name'); @endphp - + {{ $this->filtersForm }} @livewire(\App\Filament\Widgets\StatsMedianAverage::class, ['filters' => $this->filters]) @@ -19,13 +19,13 @@ @if($player_name) - - {{ $player_name }} - + + {{ $player_name }} + - - {{ $player_name }} Performance - + + {{ $player_name }} Performance + @endif @@ -55,4 +55,4 @@ - + \ No newline at end of file diff --git a/textfiles/markatires_filds.txt b/textfiles/markatires_filds.txt index e2564540..8058e1f9 100644 --- a/textfiles/markatires_filds.txt +++ b/textfiles/markatires_filds.txt @@ -57,4 +57,4 @@ // subtype_event_during_the_match // player_position // playerrating_value -// tm_player_id \ No newline at end of file +// ss_player_id \ No newline at end of file