Files
nuhodds_fi4/app/Actions/Selections/LoadPlayer.php
T
2026-06-18 17:17:52 +02:00

27 lines
570 B
PHP

<?php
namespace App\Actions\Selections;
use App\Models\StatistikoDetail;
class LoadPlayer
{
public static function load($team_id)
{
// $res = CompetitionGroup::with('country')->where('id', $league_id)->first();
// $season_mode = $res->country->season_mode;
$res = StatistikoDetail::where('txodds_id', $team_id)->get();
if (! $res) {
return [];
}
$arr = [];
foreach ($res as $val) {
$arr[$val->position][$val->tm_player_id] = $val->name;
}
return $arr;
}
}