wip
This commit is contained in:
1 parent
c394f7afba
commit
44af3f2caa
21 files changed
+222
-151
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Actions;
|
namespace App\Actions;
|
||||||
|
|
||||||
use App\Models\CompetitionGroup;
|
use App\Models\SofaScoreTournament;
|
||||||
use App\Models\StatisticFixtures;
|
use App\Models\StatisticFixtures;
|
||||||
|
|
||||||
class LoadStatisticFixturesLeaguesOptions
|
class LoadStatisticFixturesLeaguesOptions
|
||||||
@@ -13,10 +13,10 @@ class LoadStatisticFixturesLeaguesOptions
|
|||||||
->groupBy('league_id')
|
->groupBy('league_id')
|
||||||
->pluck('league_id')->toArray();
|
->pluck('league_id')->toArray();
|
||||||
|
|
||||||
$cnt = CompetitionGroup::with('country')->whereIn('id', $res)->get();
|
$cnt = SofaScoreTournament::with('sofascore_category')->whereIn('tournament_id', $res)->get();
|
||||||
$arr = [];
|
$arr = [];
|
||||||
foreach ($cnt as $val) {
|
foreach ($cnt as $val) {
|
||||||
$arr[$val->id] = $val->country->name . ' ' . $val->name;
|
$arr[$val->tournament_id] = $val->sofascore_category->name . ' ' . $val->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
asort($arr);
|
asort($arr);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use App\Models\StatisticFixtures;
|
|||||||
|
|
||||||
class LoadStatisticFixturesMatchOptions
|
class LoadStatisticFixturesMatchOptions
|
||||||
{
|
{
|
||||||
public static function load($league_id)
|
public static function load(int $league_id)
|
||||||
{
|
{
|
||||||
if (! $league_id) {
|
if (! $league_id) {
|
||||||
return [];
|
return [];
|
||||||
@@ -15,7 +15,7 @@ class LoadStatisticFixturesMatchOptions
|
|||||||
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
foreach ($res as $val) {
|
foreach ($res as $val) {
|
||||||
$arr[$val->id] = $val->starttime->format('Y-m-d H:i') . ' - ' . $val->home->name . ' vs ' . $val->away->name;
|
$arr[$val->id] = $val->starttime->format('Y-m-d H:i') . ' - ' . $val->home->ss_team_name . ' vs ' . $val->away->ss_team_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $arr;
|
return $arr;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Actions\Selections;
|
namespace App\Actions\Selections;
|
||||||
|
|
||||||
use App\Models\SofaScorePlayerPerSeason;
|
use App\Models\SofaScorePlayerPerSeason;
|
||||||
|
use App\Models\SofaScorePlayerPosition;
|
||||||
use App\Models\StatistikoEvent;
|
use App\Models\StatistikoEvent;
|
||||||
use Filament\Schemas\Components\Utilities\Get;
|
use Filament\Schemas\Components\Utilities\Get;
|
||||||
|
|
||||||
@@ -17,6 +18,7 @@ class LoadPlayer
|
|||||||
$team_position = $get('team_position');
|
$team_position = $get('team_position');
|
||||||
|
|
||||||
$season_or_date = $filter['season_or_date'] ?? 'season';
|
$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');
|
$season[] = date('Y');
|
||||||
}
|
}
|
||||||
@@ -35,8 +37,10 @@ class LoadPlayer
|
|||||||
|
|
||||||
$matches_count = count($matches);
|
$matches_count = count($matches);
|
||||||
|
|
||||||
|
$ss_positions_map = SofaScorePlayerPosition::pluck('name', 'ss_code')->toArray();
|
||||||
|
|
||||||
// needs to run daily for pre-calculaton
|
// needs to run daily for pre-calculaton
|
||||||
$player = SofaScorePlayerPerSeason::with('details')->where('tx_team_id', $team_id)->whereIn('season', $season)->get();
|
$player = SofaScorePlayerPerSeason::with('details')->where('ss_team_id', $team_id)->whereIn('season', $season)->get();
|
||||||
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
foreach ($player as $val) {
|
foreach ($player as $val) {
|
||||||
@@ -44,25 +48,31 @@ class LoadPlayer
|
|||||||
switch ($team_position) {
|
switch ($team_position) {
|
||||||
case 'home':
|
case 'home':
|
||||||
$events_played = $val->events_played_home;
|
$events_played = $val->events_played_home;
|
||||||
|
$minues_played = $val->minutes_played_home;
|
||||||
break;
|
break;
|
||||||
case 'away':
|
case 'away':
|
||||||
$events_played = $val->events_played_away;
|
$events_played = $val->events_played_away;
|
||||||
|
$minues_played = $val->minutes_played_away;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$events_played = $val->events_played_home + $val->events_played_away;
|
$events_played = $val->events_played_home + $val->events_played_away;
|
||||||
|
$minues_played = $val->minutes_played_home + $val->minutes_played_home;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$colorlevel = round($matches_count / 3);
|
$colorlevel = round($matches_count / 3);
|
||||||
|
|
||||||
$position = strtoupper($val->details->position);
|
$time_played = round($minues_played / 60) . ':';
|
||||||
|
$time_played .= $minues_played % 60;
|
||||||
|
|
||||||
|
$position = $ss_positions_map[$val->details->position] ?? 'No Specific Position';
|
||||||
|
|
||||||
if ($events_played < $colorlevel) {
|
if ($events_played < $colorlevel) {
|
||||||
$arr[$position][$val->ss_player_id] = '<span class="text-red-600 dark:text-red-500">' . $val->details->name . ' (' . $events_played . ')</span>';
|
$arr[$position][$val->ss_player_id] = '<span class="text-red-600 dark:text-red-500">' . $val->details->player_name . '(' . $events_played . ') (' . $time_played . ')</span>';
|
||||||
} else if ($events_played < $colorlevel * 2) {
|
} else if ($events_played < $colorlevel * 2) {
|
||||||
$arr[$position][$val->ss_player_id] = '<span class="text-blue-600 dark:text-blue-500">' . $val->details->name . ' (' . $events_played . ')</span>';
|
$arr[$position][$val->ss_player_id] = '<span class="text-blue-600 dark:text-blue-500">' . $val->details->player_name . ' (' . $events_played . ') (' . $time_played . '';
|
||||||
} else {
|
} else {
|
||||||
$arr[$position][$val->ss_player_id] = '<span class="text-green-600 dark:text-green-500">' . $val->details->name . ' (' . $events_played . ')</span>';
|
$arr[$position][$val->ss_player_id] = '<span class="text-green-600 dark:text-green-500">' . $val->details->player_name . ' (' . $events_played . ') (' . $time_played . ')</span>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $arr;
|
return $arr;
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Actions\Selections;
|
||||||
|
|
||||||
|
use App\Models\SofaScorePlayerPosition;
|
||||||
|
|
||||||
|
class LoadPosition
|
||||||
|
{
|
||||||
|
public static function load()
|
||||||
|
{
|
||||||
|
$res = SofaScorePlayerPosition::get();
|
||||||
|
|
||||||
|
$arr = [];
|
||||||
|
foreach ($res as $val) {
|
||||||
|
$arr[$val->ss_code] = $val->season;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $arr;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ use App\Models\StatistikoEvent;
|
|||||||
|
|
||||||
class LoadSeasons
|
class LoadSeasons
|
||||||
{
|
{
|
||||||
public static function load($league_id)
|
public static function load(int $league_id)
|
||||||
{
|
{
|
||||||
// $res = CompetitionGroup::with('country')->where('id', $league_id)->first();
|
// $res = CompetitionGroup::with('country')->where('id', $league_id)->first();
|
||||||
// $season_mode = $res->country->season_mode;
|
// $season_mode = $res->country->season_mode;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class PlayerPerSeason
|
|||||||
{
|
{
|
||||||
$debug = Nuh::$options['d'] ?? 0;
|
$debug = Nuh::$options['d'] ?? 0;
|
||||||
|
|
||||||
$res = StatistikoDetail::query()->select('ss_player_id', 'txodds_id')->get();
|
$res = StatistikoDetail::query()->select('ss_player_id', 'ss_team_id')->get();
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note('process ' . $res->count() . " player", 'bb');
|
Notice::note('process ' . $res->count() . " player", 'bb');
|
||||||
@@ -35,10 +35,12 @@ class PlayerPerSeason
|
|||||||
$collection[$val2->event->season]['minutes_played_away'] = 0;
|
$collection[$val2->event->season]['minutes_played_away'] = 0;
|
||||||
}
|
}
|
||||||
if ($val2->minutes_played > 0) {
|
if ($val2->minutes_played > 0) {
|
||||||
if ($val->txodds_id == $val2->event->home_id) {
|
if ($val2->activeteam_id == $val2->event->home_id) {
|
||||||
|
|
||||||
$collection[$val2->event->season]['events_played_home'] += 1;
|
$collection[$val2->event->season]['events_played_home'] += 1;
|
||||||
$collection[$val2->event->season]['minutes_played_home'] += $val2->minutes_played;
|
$collection[$val2->event->season]['minutes_played_home'] += $val2->minutes_played;
|
||||||
} else if ($val->txodds_id == $val2->event->away_id) {
|
} else if ($val2->activeteam_id == $val2->event->away_id) {
|
||||||
|
|
||||||
$collection[$val2->event->season]['events_played_away'] += 1;
|
$collection[$val2->event->season]['events_played_away'] += 1;
|
||||||
$collection[$val2->event->season]['minutes_played_away'] += $val2->minutes_played;
|
$collection[$val2->event->season]['minutes_played_away'] += $val2->minutes_played;
|
||||||
}
|
}
|
||||||
@@ -46,11 +48,11 @@ class PlayerPerSeason
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($collection as $season => $row) {
|
foreach ($collection as $season => $row) {
|
||||||
if ($val->txodds_id && $val->ss_player_id) {
|
if ($val->ss_team_id && $val->ss_player_id) {
|
||||||
SofaScorePlayerPerSeason::updateOrCreate(
|
SofaScorePlayerPerSeason::updateOrCreate(
|
||||||
[
|
[
|
||||||
'ss_player_id' => $val->ss_player_id,
|
'ss_player_id' => $val->ss_player_id,
|
||||||
'tx_team_id' => $val->txodds_id,
|
'ss_team_id' => $val->ss_team_id,
|
||||||
'season' => $season
|
'season' => $season
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|||||||
+3
-3
@@ -18,14 +18,14 @@ class StatistikoDetailForm
|
|||||||
'xl' => 4,
|
'xl' => 4,
|
||||||
])->schema([
|
])->schema([
|
||||||
TextInput::make('ss_player_id')->required(),
|
TextInput::make('ss_player_id')->required(),
|
||||||
|
TextInput::make('ss_team_id')->required(),
|
||||||
|
TextInput::make('tx_team_id'),
|
||||||
TextInput::make('player_name')->required(),
|
TextInput::make('player_name')->required(),
|
||||||
|
DatePicker::make('ss_national_team_id'),
|
||||||
DatePicker::make('birthdate'),
|
DatePicker::make('birthdate'),
|
||||||
TextInput::make('height'),
|
TextInput::make('height'),
|
||||||
TextInput::make('nationality'),
|
TextInput::make('nationality'),
|
||||||
TextInput::make('position'),
|
TextInput::make('position'),
|
||||||
TextInput::make('ss_national_team_id'),
|
|
||||||
TextInput::make('tx_team_id'),
|
|
||||||
TextInput::make('team_name'),
|
|
||||||
TextInput::make('preferred_foot'),
|
TextInput::make('preferred_foot'),
|
||||||
DatePicker::make('last_update'),
|
DatePicker::make('last_update'),
|
||||||
]),
|
]),
|
||||||
|
|||||||
-1
@@ -19,7 +19,6 @@ class StatistikoPlayerForm
|
|||||||
TextInput::make('sport_id'),
|
TextInput::make('sport_id'),
|
||||||
TextInput::make('match_id'),
|
TextInput::make('match_id'),
|
||||||
TextInput::make('ss_player_id'),
|
TextInput::make('ss_player_id'),
|
||||||
TextInput::make('ss_player_id'),
|
|
||||||
TextInput::make('activeteam_id'),
|
TextInput::make('activeteam_id'),
|
||||||
TextInput::make('playersubstitute_id'),
|
TextInput::make('playersubstitute_id'),
|
||||||
TextInput::make('goals'),
|
TextInput::make('goals'),
|
||||||
|
|||||||
+2
-3
@@ -21,12 +21,11 @@ class StatistikoPlayersTable
|
|||||||
return $table
|
return $table
|
||||||
->columns([
|
->columns([
|
||||||
TextColumn::make('match_id')->searchable(),
|
TextColumn::make('match_id')->searchable(),
|
||||||
TextColumn::make('details.name')
|
TextColumn::make('ss_player_id')->label('SofaScore Id')->searchable(),
|
||||||
|
TextColumn::make('details.player_name')
|
||||||
->label('Player')
|
->label('Player')
|
||||||
->searchable()
|
->searchable()
|
||||||
->tooltip(fn($record) => $record->details->full_name),
|
->tooltip(fn($record) => $record->details->full_name),
|
||||||
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.home.name')->searchable()->color('primary'),
|
||||||
TextColumn::make('event.away.name')->searchable()->color('success'),
|
TextColumn::make('event.away.name')->searchable()->color('success'),
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class ImportDetails
|
|||||||
$row = array_values($row);
|
$row = array_values($row);
|
||||||
|
|
||||||
// ss_player_id
|
// ss_player_id
|
||||||
|
//
|
||||||
// ss_team_id
|
// ss_team_id
|
||||||
// tx_team_id
|
// tx_team_id
|
||||||
// player_name
|
// player_name
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class ImportPlayer
|
|||||||
'penaltyshoutout_missed',
|
'penaltyshoutout_missed',
|
||||||
'player_position',
|
'player_position',
|
||||||
'playerrating_value',
|
'playerrating_value',
|
||||||
'ss_player_id'
|
'tm_player_id'
|
||||||
];
|
];
|
||||||
|
|
||||||
SimpleExcelReader::create(storage_path('app/public/' . $filePath))
|
SimpleExcelReader::create(storage_path('app/public/' . $filePath))
|
||||||
@@ -89,15 +89,12 @@ class ImportPlayer
|
|||||||
|
|
||||||
$row = array_values($row);
|
$row = array_values($row);
|
||||||
|
|
||||||
$sport_id = 1;
|
|
||||||
$match_id = 0;
|
$match_id = 0;
|
||||||
$ss_player_id = 0;
|
$ss_player_id = 0;
|
||||||
|
|
||||||
$update_array = [];
|
$update_array = [];
|
||||||
foreach ($fieldnames as $key => $name) {
|
foreach ($fieldnames as $key => $name) {
|
||||||
if ($key == 0)
|
if ($key == 1)
|
||||||
$sport_id = (int) $row[$key];
|
|
||||||
else if ($key == 1)
|
|
||||||
$match_id = (int) $row[$key];
|
$match_id = (int) $row[$key];
|
||||||
else if ($key == 2)
|
else if ($key == 2)
|
||||||
$ss_player_id = (int) $row[$key];
|
$ss_player_id = (int) $row[$key];
|
||||||
@@ -107,7 +104,6 @@ class ImportPlayer
|
|||||||
|
|
||||||
StatistikoPlayer::updateOrCreate(
|
StatistikoPlayer::updateOrCreate(
|
||||||
[
|
[
|
||||||
'sport_id' => $sport_id,
|
|
||||||
'match_id' => $match_id,
|
'match_id' => $match_id,
|
||||||
'ss_player_id' => $ss_player_id,
|
'ss_player_id' => $ss_player_id,
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ use App\Actions\LoadStatisticFixturesMatchOptions;
|
|||||||
use App\Actions\Selections\LoadPlayer;
|
use App\Actions\Selections\LoadPlayer;
|
||||||
use App\Actions\Selections\LoadSeasons;
|
use App\Actions\Selections\LoadSeasons;
|
||||||
use App\Models\Element;
|
use App\Models\Element;
|
||||||
|
use App\Models\SofaScoreRosa;
|
||||||
use App\Models\StatisticFixtures;
|
use App\Models\StatisticFixtures;
|
||||||
use BackedEnum;
|
use BackedEnum;
|
||||||
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
|
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
|
||||||
@@ -108,9 +109,12 @@ class Statistic extends BaseDashboard
|
|||||||
if ($get('match_id')) {
|
if ($get('match_id')) {
|
||||||
$res = StatisticFixtures::where('id', $get('match_id'))->first();
|
$res = StatisticFixtures::where('id', $get('match_id'))->first();
|
||||||
|
|
||||||
|
|
||||||
$arr = [];
|
$arr = [];
|
||||||
$arr[$res->home_id] = Element::query()->where('id', $res->home_id)->value('name');
|
if ($res) {
|
||||||
$arr[$res->away_id] = Element::query()->where('id', $res->away_id)->value('name');
|
$arr[$res->home_id] = SofaScoreRosa::query()->where('ss_team_id', $res->home_id)->value('ss_team_name');
|
||||||
|
$arr[$res->away_id] = SofaScoreRosa::query()->where('ss_team_id', $res->away_id)->value('ss_team_name');
|
||||||
|
}
|
||||||
|
|
||||||
return $arr;
|
return $arr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ class LoadPerformance
|
|||||||
|
|
||||||
public static function load(array $filter, bool $hasdots)
|
public static function load(array $filter, bool $hasdots)
|
||||||
{
|
{
|
||||||
// dd($filter);
|
|
||||||
|
|
||||||
$league_id = (int) $filter['league_id'] ?? 0;
|
$league_id = (int) $filter['league_id'] ?? 0;
|
||||||
|
|
||||||
@@ -34,8 +33,12 @@ class LoadPerformance
|
|||||||
|
|
||||||
$match = StatisticFixtures::with('home')->with('away')->where('id', $match_id)->first();
|
$match = StatisticFixtures::with('home')->with('away')->where('id', $match_id)->first();
|
||||||
|
|
||||||
$home_id = $match->home_id;
|
if (! $match) {
|
||||||
$away_id = $match->away_id;
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$home_id = $match->home_id ?? 0;
|
||||||
|
$away_id = $match->away_id ?? 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class LoadPlayer
|
|||||||
$statistic_type = 'gls';
|
$statistic_type = 'gls';
|
||||||
}
|
}
|
||||||
|
|
||||||
$player_name = StatistikoDetail::where('ss_player_id', (int) $ss_player_id)->value('name');
|
$player_name = StatistikoDetail::where('ss_player_id', (int) $ss_player_id)->value('player_name');
|
||||||
|
|
||||||
$res = StatistikoPlayer::with('event')->where('ss_player_id', (int) $ss_player_id)->get();
|
$res = StatistikoPlayer::with('event')->where('ss_player_id', (int) $ss_player_id)->get();
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class RosaTournament extends Model
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ class SofaScorePlayerPerSeason extends Model
|
|||||||
{
|
{
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'ss_player_id',
|
'ss_player_id',
|
||||||
'tx_team_id',
|
'ss_team_id',
|
||||||
'season',
|
'season',
|
||||||
'events_played_home',
|
'events_played_home',
|
||||||
'events_played_away',
|
'events_played_away',
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ class StatisticFixtures extends Model
|
|||||||
|
|
||||||
public function home()
|
public function home()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Element::class);
|
return $this->belongsTo(SofaScoreRosa::class, 'home_id', 'ss_team_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function away()
|
public function away()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Element::class);
|
return $this->belongsTo(SofaScoreRosa::class, 'away_id', 'ss_team_id');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,6 +80,6 @@ class StatistikoPlayer extends Model
|
|||||||
|
|
||||||
public function details()
|
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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -14,7 +14,7 @@ return new class extends Migration
|
|||||||
Schema::create('sofa_score_player_per_seasons', function (Blueprint $table) {
|
Schema::create('sofa_score_player_per_seasons', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->integer('ss_player_id')->index();
|
$table->integer('ss_player_id')->index();
|
||||||
$table->integer('tx_team_id')->index();
|
$table->integer('ss_team_id')->index();
|
||||||
$table->string('season')->index();
|
$table->string('season')->index();
|
||||||
$table->integer('events_played_home')->default(0)->nullable();
|
$table->integer('events_played_home')->default(0)->nullable();
|
||||||
$table->integer('events_played_away')->default(0)->nullable();
|
$table->integer('events_played_away')->default(0)->nullable();
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('rosa_tournaments', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('rosa_tournaments');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -26,117 +26,117 @@ class SofaScorePlayerPositionSeeder extends Seeder
|
|||||||
('MR', 'Right Midfield'),
|
('MR', 'Right Midfield'),
|
||||||
('RW', 'Right Winger'),
|
('RW', 'Right Winger'),
|
||||||
('ST', 'Centre-Forward'),
|
('ST', 'Centre-Forward'),
|
||||||
('DC_AM', 'Centre-Back, Attacking Midfield'),
|
('DC-AM', 'Centre-Back, Attacking Midfield'),
|
||||||
('DL_AM', 'Left-Back, Attacking Midfield'),
|
('DL-AM', 'Left-Back, Attacking Midfield'),
|
||||||
('DM_AM', 'Defensive Midfield, Attacking Midfield'),
|
('DM-AM', 'Defensive Midfield, Attacking Midfield'),
|
||||||
('DR_AM', 'Right-Back, Attacking Midfield'),
|
('DR-AM', 'Right-Back, Attacking Midfield'),
|
||||||
('LW_AM', 'Left Winger, Attacking Midfield'),
|
('LW-AM', 'Left Winger, Attacking Midfield'),
|
||||||
('MC_AM', 'Central Midfield, Attacking Midfield'),
|
('MC-AM', 'Central Midfield, Attacking Midfield'),
|
||||||
('ML_AM', 'Left Midfield, Attacking Midfield'),
|
('ML-AM', 'Left Midfield, Attacking Midfield'),
|
||||||
('MR_AM', 'Right Midfield, Attacking Midfield'),
|
('MR-AM', 'Right Midfield, Attacking Midfield'),
|
||||||
('RW_AM', 'Right Winger, Attacking Midfield'),
|
('RW-AM', 'Right Winger, Attacking Midfield'),
|
||||||
('ST_AM', 'Centre-Forward, Attacking Midfield'),
|
('ST-AM', 'Centre-Forward, Attacking Midfield'),
|
||||||
('AM_DC', 'Attacking Midfield, Centre-Back'),
|
('AM-DC', 'Attacking Midfield, Centre-Back'),
|
||||||
('DL_DC', 'Left-Back, Centre-Back'),
|
('DL-DC', 'Left-Back, Centre-Back'),
|
||||||
('DM_DC', 'Defensive Midfield, Centre-Back'),
|
('DM-DC', 'Defensive Midfield, Centre-Back'),
|
||||||
('DR_DC', 'Right-Back, Centre-Back'),
|
('DR-DC', 'Right-Back, Centre-Back'),
|
||||||
('LW_DC', 'Left Winger, Centre-Back'),
|
('LW-DC', 'Left Winger, Centre-Back'),
|
||||||
('MC_DC', 'Central Midfield, Centre-Back'),
|
('MC-DC', 'Central Midfield, Centre-Back'),
|
||||||
('ML_DC', 'Left Midfield, Centre-Back'),
|
('ML-DC', 'Left Midfield, Centre-Back'),
|
||||||
('MR_DC', 'Right Midfield, Centre-Back'),
|
('MR-DC', 'Right Midfield, Centre-Back'),
|
||||||
('RW_DC', 'Right Winger, Centre-Back'),
|
('RW-DC', 'Right Winger, Centre-Back'),
|
||||||
('ST_DC', 'Centre-Forward, Centre-Back'),
|
('ST-DC', 'Centre-Forward, Centre-Back'),
|
||||||
('AM_DL', 'Attacking Midfield, Left-Back'),
|
('AM-DL', 'Attacking Midfield, Left-Back'),
|
||||||
('DC_DL', 'Centre-Back, Left-Back'),
|
('DC-DL', 'Centre-Back, Left-Back'),
|
||||||
('DM_DL', 'Defensive Midfield, Left-Back'),
|
('DM-DL', 'Defensive Midfield, Left-Back'),
|
||||||
('DR_DL', 'Right-Back, Left-Back'),
|
('DR-DL', 'Right-Back, Left-Back'),
|
||||||
('LW_DL', 'Left Winger, Left-Back'),
|
('LW-DL', 'Left Winger, Left-Back'),
|
||||||
('MC_DL', 'Central Midfield, Left-Back'),
|
('MC-DL', 'Central Midfield, Left-Back'),
|
||||||
('ML_DL', 'Left Midfield, Left-Back'),
|
('ML-DL', 'Left Midfield, Left-Back'),
|
||||||
('MR_DL', 'Right Midfield, Left-Back'),
|
('MR-DL', 'Right Midfield, Left-Back'),
|
||||||
('RW_DL', 'Right Winger, Left-Back'),
|
('RW-DL', 'Right Winger, Left-Back'),
|
||||||
('ST_DL', 'Centre-Forward, Left-Back'),
|
('ST-DL', 'Centre-Forward, Left-Back'),
|
||||||
('AM_DM', 'Attacking Midfield, Defensive Midfield'),
|
('AM-DM', 'Attacking Midfield, Defensive Midfield'),
|
||||||
('DC_DM', 'Centre-Back, Defensive Midfield'),
|
('DC-DM', 'Centre-Back, Defensive Midfield'),
|
||||||
('DL_DM', 'Left-Back, Defensive Midfield'),
|
('DL-DM', 'Left-Back, Defensive Midfield'),
|
||||||
('DR_DM', 'Right-Back, Defensive Midfield'),
|
('DR-DM', 'Right-Back, Defensive Midfield'),
|
||||||
('LW_DM', 'Left Winger, Defensive Midfield'),
|
('LW-DM', 'Left Winger, Defensive Midfield'),
|
||||||
('MC_DM', 'Central Midfield, Defensive Midfield'),
|
('MC-DM', 'Central Midfield, Defensive Midfield'),
|
||||||
('ML_DM', 'Left Midfield, Defensive Midfield'),
|
('ML-DM', 'Left Midfield, Defensive Midfield'),
|
||||||
('MR_DM', 'Right Midfield, Defensive Midfield'),
|
('MR-DM', 'Right Midfield, Defensive Midfield'),
|
||||||
('RW_DM', 'Right Winger, Defensive Midfield'),
|
('RW-DM', 'Right Winger, Defensive Midfield'),
|
||||||
('ST_DM', 'Centre-Forward, Defensive Midfield'),
|
('ST-DM', 'Centre-Forward, Defensive Midfield'),
|
||||||
('AM_DR', 'Attacking Midfield, Right-Back'),
|
('AM-DR', 'Attacking Midfield, Right-Back'),
|
||||||
('DC_DR', 'Centre-Back, Right-Back'),
|
('DC-DR', 'Centre-Back, Right-Back'),
|
||||||
('DL_DR', 'Left-Back, Right-Back'),
|
('DL-DR', 'Left-Back, Right-Back'),
|
||||||
('DM_DR', 'Defensive Midfield, Right-Back'),
|
('DM-DR', 'Defensive Midfield, Right-Back'),
|
||||||
('LW_DR', 'Left Winger, Right-Back'),
|
('LW-DR', 'Left Winger, Right-Back'),
|
||||||
('MC_DR', 'Central Midfield, Right-Back'),
|
('MC-DR', 'Central Midfield, Right-Back'),
|
||||||
('ML_DR', 'Left Midfield, Right-Back'),
|
('ML-DR', 'Left Midfield, Right-Back'),
|
||||||
('MR_DR', 'Right Midfield, Right-Back'),
|
('MR-DR', 'Right Midfield, Right-Back'),
|
||||||
('RW_DR', 'Right Winger, Right-Back'),
|
('RW-DR', 'Right Winger, Right-Back'),
|
||||||
('ST_DR', 'Centre-Forward, Right-Back'),
|
('ST-DR', 'Centre-Forward, Right-Back'),
|
||||||
('AM_LW', 'Attacking Midfield, Left Winger'),
|
('AM-LW', 'Attacking Midfield, Left Winger'),
|
||||||
('DC_LW', 'Centre-Back, Left Winger'),
|
('DC-LW', 'Centre-Back, Left Winger'),
|
||||||
('DL_LW', 'Left-Back, Left Winger'),
|
('DL-LW', 'Left-Back, Left Winger'),
|
||||||
('DM_LW', 'Defensive Midfield, Left Winger'),
|
('DM-LW', 'Defensive Midfield, Left Winger'),
|
||||||
('DR_LW', 'Right-Back, Left Winger'),
|
('DR-LW', 'Right-Back, Left Winger'),
|
||||||
('MC_LW', 'Central Midfield, Left Winger'),
|
('MC-LW', 'Central Midfield, Left Winger'),
|
||||||
('ML_LW', 'Left Midfield, Left Winger'),
|
('ML-LW', 'Left Midfield, Left Winger'),
|
||||||
('MR_LW', 'Right Midfield, Left Winger'),
|
('MR-LW', 'Right Midfield, Left Winger'),
|
||||||
('RW_LW', 'Right Winger, Left Winger'),
|
('RW-LW', 'Right Winger, Left Winger'),
|
||||||
('ST_LW', 'Centre-Forward, Left Winger'),
|
('ST-LW', 'Centre-Forward, Left Winger'),
|
||||||
('AM_MC', 'Attacking Midfield, Central Midfield'),
|
('AM-MC', 'Attacking Midfield, Central Midfield'),
|
||||||
('DC_MC', 'Centre-Back, Central Midfield'),
|
('DC-MC', 'Centre-Back, Central Midfield'),
|
||||||
('DL_MC', 'Left-Back, Central Midfield'),
|
('DL-MC', 'Left-Back, Central Midfield'),
|
||||||
('DM_MC', 'Defensive Midfield, Central Midfield'),
|
('DM-MC', 'Defensive Midfield, Central Midfield'),
|
||||||
('DR_MC', 'Right-Back, Central Midfield'),
|
('DR-MC', 'Right-Back, Central Midfield'),
|
||||||
('LW_MC', 'Left Winger, Central Midfield'),
|
('LW-MC', 'Left Winger, Central Midfield'),
|
||||||
('ML_MC', 'Left Midfield, Central Midfield'),
|
('ML-MC', 'Left Midfield, Central Midfield'),
|
||||||
('MR_MC', 'Right Midfield, Central Midfield'),
|
('MR-MC', 'Right Midfield, Central Midfield'),
|
||||||
('RW_MC', 'Right Winger, Central Midfield'),
|
('RW-MC', 'Right Winger, Central Midfield'),
|
||||||
('ST_MC', 'Centre-Forward, Central Midfield'),
|
('ST-MC', 'Centre-Forward, Central Midfield'),
|
||||||
('AM_ML', 'Attacking Midfield, Left Midfield'),
|
('AM-ML', 'Attacking Midfield, Left Midfield'),
|
||||||
('DC_ML', 'Centre-Back, Left Midfield'),
|
('DC-ML', 'Centre-Back, Left Midfield'),
|
||||||
('DL_ML', 'Left-Back, Left Midfield'),
|
('DL-ML', 'Left-Back, Left Midfield'),
|
||||||
('DM_ML', 'Defensive Midfield, Left Midfield'),
|
('DM-ML', 'Defensive Midfield, Left Midfield'),
|
||||||
('DR_ML', 'Right-Back, Left Midfield'),
|
('DR-ML', 'Right-Back, Left Midfield'),
|
||||||
('LW_ML', 'Left Winger, Left Midfield'),
|
('LW-ML', 'Left Winger, Left Midfield'),
|
||||||
('MC_ML', 'Central Midfield, Left Midfield'),
|
('MC-ML', 'Central Midfield, Left Midfield'),
|
||||||
('MR_ML', 'Right Midfield, Left Midfield'),
|
('MR-ML', 'Right Midfield, Left Midfield'),
|
||||||
('RW_ML', 'Right Winger, Left Midfield'),
|
('RW-ML', 'Right Winger, Left Midfield'),
|
||||||
('ST_ML', 'Centre-Forward, Left Midfield'),
|
('ST-ML', 'Centre-Forward, Left Midfield'),
|
||||||
('AM_MR', 'Attacking Midfield, Right Midfield'),
|
('AM-MR', 'Attacking Midfield, Right Midfield'),
|
||||||
('DC_MR', 'Centre-Back, Right Midfield'),
|
('DC-MR', 'Centre-Back, Right Midfield'),
|
||||||
('DL_MR', 'Left-Back, Right Midfield'),
|
('DL-MR', 'Left-Back, Right Midfield'),
|
||||||
('DM_MR', 'Defensive Midfield, Right Midfield'),
|
('DM-MR', 'Defensive Midfield, Right Midfield'),
|
||||||
('DR_MR', 'Right-Back, Right Midfield'),
|
('DR-MR', 'Right-Back, Right Midfield'),
|
||||||
('LW_MR', 'Left Winger, Right Midfield'),
|
('LW-MR', 'Left Winger, Right Midfield'),
|
||||||
('MC_MR', 'Central Midfield, Right Midfield'),
|
('MC-MR', 'Central Midfield, Right Midfield'),
|
||||||
('ML_MR', 'Left Midfield, Right Midfield'),
|
('ML-MR', 'Left Midfield, Right Midfield'),
|
||||||
('RW_MR', 'Right Winger, Right Midfield'),
|
('RW-MR', 'Right Winger, Right Midfield'),
|
||||||
('ST_MR', 'Centre-Forward, Right Midfield'),
|
('ST-MR', 'Centre-Forward, Right Midfield'),
|
||||||
('AM_RW', 'Attacking Midfield, Right Winger'),
|
('AM-RW', 'Attacking Midfield, Right Winger'),
|
||||||
('DC_RW', 'Centre-Back, Right Winger'),
|
('DC-RW', 'Centre-Back, Right Winger'),
|
||||||
('DL_RW', 'Left-Back, Right Winger'),
|
('DL-RW', 'Left-Back, Right Winger'),
|
||||||
('DM_RW', 'Defensive Midfield, Right Winger'),
|
('DM-RW', 'Defensive Midfield, Right Winger'),
|
||||||
('DR_RW', 'Right-Back, Right Winger'),
|
('DR-RW', 'Right-Back, Right Winger'),
|
||||||
('LW_RW', 'Left Winger, Right Winger'),
|
('LW-RW', 'Left Winger, Right Winger'),
|
||||||
('MC_RW', 'Central Midfield, Right Winger'),
|
('MC-RW', 'Central Midfield, Right Winger'),
|
||||||
('ML_RW', 'Left Midfield, Right Winger'),
|
('ML-RW', 'Left Midfield, Right Winger'),
|
||||||
('MR_RW', 'Right Midfield, Right Winger'),
|
('MR-RW', 'Right Midfield, Right Winger'),
|
||||||
('ST_RW', 'Centre-Forward, Right Winger'),
|
('ST-RW', 'Centre-Forward, Right Winger'),
|
||||||
('AM_ST', 'Attacking Midfield, Centre-Forward'),
|
('AM-ST', 'Attacking Midfield, Centre-Forward'),
|
||||||
('DC_ST', 'Centre-Back, Centre-Forward'),
|
('DC-ST', 'Centre-Back, Centre-Forward'),
|
||||||
('DL_ST', 'Left-Back, Centre-Forward'),
|
('DL-ST', 'Left-Back, Centre-Forward'),
|
||||||
('DM_ST', 'Defensive Midfield, Centre-Forward'),
|
('DM-ST', 'Defensive Midfield, Centre-Forward'),
|
||||||
('DR_ST', 'Right-Back, Centre-Forward'),
|
('DR-ST', 'Right-Back, Centre-Forward'),
|
||||||
('LW_ST', 'Left Winger, Centre-Forward'),
|
('LW-ST', 'Left Winger, Centre-Forward'),
|
||||||
('MC_ST', 'Central Midfield, Centre-Forward'),
|
('MC-ST', 'Central Midfield, Centre-Forward'),
|
||||||
('ML_ST', 'Left Midfield, Centre-Forward'),
|
('ML-ST', 'Left Midfield, Centre-Forward'),
|
||||||
('MR_ST', 'Right Midfield, Centre-Forward'),
|
('MR-ST', 'Right Midfield, Centre-Forward'),
|
||||||
('RW_ST', 'Right Winger, Centre-Forward');
|
('RW-ST', 'Right Winger, Centre-Forward');
|
||||||
";
|
";
|
||||||
DB::unprepared($sql);
|
DB::unprepared($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user