wip
This commit is contained in:
1 parent
08a1522868
commit
26052c6cfd
15 files changed
+594
-62
No files matched your search
@@ -4,24 +4,12 @@ namespace App\Livewire;
|
||||
|
||||
use App\Filament\Pages\Selections\LoadPositions;
|
||||
use App\Models\SofaScorePlayerPerSeason;
|
||||
use Filament\Widgets\Concerns\InteractsWithPageFilters;
|
||||
use Livewire\Component;
|
||||
|
||||
class PlayerCalculator extends Component
|
||||
{
|
||||
use InteractsWithPageFilters;
|
||||
|
||||
public $players = [];
|
||||
|
||||
public function mount(array $filters)
|
||||
public static function load(int $team_id)
|
||||
{
|
||||
$this->players = self::load($filters);
|
||||
}
|
||||
|
||||
public static function load(array $filters)
|
||||
{
|
||||
$team_id = (int) $filters['team_id'];
|
||||
|
||||
$positions_map = LoadPositions::load();
|
||||
|
||||
$player = SofaScorePlayerPerSeason::with('details')->where('season', '=', 'total')->where('ss_team_id', '=', $team_id)->get();
|
||||
@@ -33,6 +21,7 @@ class PlayerCalculator extends Component
|
||||
$tmp['name'] = $val->details->player_name;
|
||||
$tmp['pos_ori'] = $val->details->position;
|
||||
$tmp['pos'] = '';
|
||||
$tmp['active'] = 0;
|
||||
$tmp['foot'] = $val->details->preferred_foot;
|
||||
$tmp['tot_evt'] = $val->total_events;
|
||||
$tmp['tot_min'] = $val->total_min;
|
||||
|
||||
Reference in new issue
Block a user