grapper wip
This commit is contained in:
1 parent
6a9173e3eb
commit
361e5ed3ed
15 files changed
+310
-120
No files matched your search
@@ -181,7 +181,7 @@ class Tournament
|
|||||||
Notice::note("tournaments: $tournaments_counter", 'p');
|
Notice::note("tournaments: $tournaments_counter", 'p');
|
||||||
}
|
}
|
||||||
|
|
||||||
SofaScoreDay::updateOrCreate(['day' => $day], [$sport->ss_slug => 1]);
|
SofaScoreDay::updateOrCreate(['day' => $day], ['sport_id' => $sport->id]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
|
|||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\SofaScoreDayTournamentResource;
|
||||||
|
use Filament\Resources\Pages\CreateRecord;
|
||||||
|
|
||||||
|
class CreateSofaScoreDayTournament extends CreateRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = SofaScoreDayTournamentResource::class;
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\SofaScoreDayTournamentResource;
|
||||||
|
use Filament\Actions\DeleteAction;
|
||||||
|
use Filament\Resources\Pages\EditRecord;
|
||||||
|
|
||||||
|
class EditSofaScoreDayTournament extends EditRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = SofaScoreDayTournamentResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
DeleteAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\SofaScoreDayTournamentResource;
|
||||||
|
use Filament\Actions\CreateAction;
|
||||||
|
use Filament\Resources\Pages\ListRecords;
|
||||||
|
|
||||||
|
class ListSofaScoreDayTournaments extends ListRecords
|
||||||
|
{
|
||||||
|
protected static string $resource = SofaScoreDayTournamentResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
CreateAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Schemas;
|
||||||
|
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
|
||||||
|
class SofaScoreDayTournamentForm
|
||||||
|
{
|
||||||
|
public static function configure(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return $schema
|
||||||
|
->components([
|
||||||
|
//
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments;
|
||||||
|
|
||||||
|
use App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Pages\CreateSofaScoreDayTournament;
|
||||||
|
use App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Pages\EditSofaScoreDayTournament;
|
||||||
|
use App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Pages\ListSofaScoreDayTournaments;
|
||||||
|
use App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Schemas\SofaScoreDayTournamentForm;
|
||||||
|
use App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Tables\SofaScoreDayTournamentsTable;
|
||||||
|
use App\Filament\Clusters\StaticData\StaticDataCluster;
|
||||||
|
use App\Models\SofaScoreDayTournament;
|
||||||
|
use Filament\Resources\Resource;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
use Livewire\Livewire;
|
||||||
|
use UnitEnum;
|
||||||
|
|
||||||
|
class SofaScoreDayTournamentResource extends Resource
|
||||||
|
{
|
||||||
|
protected static bool $shouldRegisterNavigation = false;
|
||||||
|
|
||||||
|
protected static ?string $model = SofaScoreDayTournament::class;
|
||||||
|
|
||||||
|
protected static string|UnitEnum|null $navigationGroup = 'SofaScore';
|
||||||
|
|
||||||
|
protected static ?string $cluster = StaticDataCluster::class;
|
||||||
|
|
||||||
|
protected static ?string $recordTitleAttribute = 'Days & Tournaments';
|
||||||
|
|
||||||
|
protected static ?string $navigationLabel = 'Days & Tournaments';
|
||||||
|
|
||||||
|
public static function form(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return SofaScoreDayTournamentForm::configure($schema);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return SofaScoreDayTournamentsTable::configure($table);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'index' => ListSofaScoreDayTournaments::route('/'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getNavigationBadge(): ?string
|
||||||
|
{
|
||||||
|
// return parent::getEloquentQuery()->count();
|
||||||
|
// Ensure we are on the list page
|
||||||
|
if (! class_exists(Livewire::class) || Livewire::current() === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$livewire = Livewire::current();
|
||||||
|
|
||||||
|
// Check if the current component has the table filtering traits
|
||||||
|
if (method_exists($livewire, 'getFilteredTableQuery')) {
|
||||||
|
return (string) $livewire->getFilteredTableQuery()->count();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Clusters\StaticData\Resources\SofaScoreDayTournaments\Tables;
|
||||||
|
|
||||||
|
use Filament\Actions\BulkActionGroup;
|
||||||
|
use Filament\Actions\DeleteBulkAction;
|
||||||
|
use Filament\Actions\EditAction;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
|
class SofaScoreDayTournamentsTable
|
||||||
|
{
|
||||||
|
public static function configure(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->columns([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->filters([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->recordActions([
|
||||||
|
EditAction::make(),
|
||||||
|
])
|
||||||
|
->toolbarActions([
|
||||||
|
BulkActionGroup::make([
|
||||||
|
DeleteBulkAction::make(),
|
||||||
|
]),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
+58
-54
@@ -2,82 +2,72 @@
|
|||||||
|
|
||||||
namespace App\Filament\Clusters\StaticData\Resources\SofaScoreDays\Tables;
|
namespace App\Filament\Clusters\StaticData\Resources\SofaScoreDays\Tables;
|
||||||
|
|
||||||
|
use App\Models\SofaScoreDay;
|
||||||
|
use App\Models\Sport;
|
||||||
|
use Filament\Actions\Action;
|
||||||
use Filament\Actions\BulkActionGroup;
|
use Filament\Actions\BulkActionGroup;
|
||||||
use Filament\Actions\DeleteBulkAction;
|
use Filament\Actions\DeleteBulkAction;
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
use Filament\Forms\Components\DatePicker;
|
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Tables\Columns\CheckboxColumn;
|
use Filament\Forms\Components\Toggle;
|
||||||
|
use Filament\Tables\Columns\IconColumn;
|
||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
|
use Filament\Tables\Columns\ToggleColumn;
|
||||||
use Filament\Tables\Enums\FiltersLayout;
|
use Filament\Tables\Enums\FiltersLayout;
|
||||||
use Filament\Tables\Filters\Filter;
|
use Filament\Tables\Filters\Filter;
|
||||||
|
use Filament\Tables\Filters\Indicator;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
|
|
||||||
class SofaScoreDaysTable
|
class SofaScoreDaysTable
|
||||||
{
|
{
|
||||||
public static function configure(Table $table): Table
|
public static function configure(Table $table): Table
|
||||||
{
|
{
|
||||||
return $table
|
return $table
|
||||||
->description('Sport checked is grapped, uncheck to grap data for specivic day again.')
|
->description('For days checked events active in tournaments will be grapped.')
|
||||||
|
->headerActions([
|
||||||
|
Action::make('reset')->icon('phosphor-power')->action(fn() => SofaScoreDay::query()->update(['football' => 0])),
|
||||||
|
])
|
||||||
->columns([
|
->columns([
|
||||||
TextColumn::make('day')->sortable(),
|
TextColumn::make('day')->sortable(),
|
||||||
CheckboxColumn::make('football'),
|
TextColumn::make('sport.name'),
|
||||||
CheckboxColumn::make('basketball'),
|
ToggleColumn::make('enabled'),
|
||||||
CheckboxColumn::make('ice-hockey'),
|
|
||||||
CheckboxColumn::make('tennis'),
|
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
Filter::make('day')
|
Filter::make('day')
|
||||||
->columns(3)->columnSpan(3)
|
->columns(4)->columnSpan(4)
|
||||||
->schema([
|
->schema([
|
||||||
DatePicker::make('from')->native(),
|
Select::make('sport_id')
|
||||||
DatePicker::make('until')->native(),
|
->default(1)
|
||||||
Select::make('sports-grapper')
|
->selectablePlaceholder(false)
|
||||||
->options([
|
->label('Sport')
|
||||||
'1' => 'Soccer Grapped',
|
->options(Sport::where('is_active', 1)->pluck('name', 'id')),
|
||||||
'2' => 'Soccer Not Grapped',
|
Select::make('year')->options(self::years()),
|
||||||
'3' => 'Basketball Grapped',
|
Select::make('month')->options(self::month()),
|
||||||
'4' => 'Basketball Not Grapped',
|
Toggle::make('enabled'),
|
||||||
'5' => 'Ice-Hockey Grapped',
|
|
||||||
'6' => 'Ice-Hockey Not Grapped',
|
|
||||||
'7' => 'Tennis Grapped',
|
|
||||||
'8' => 'Tennis Not Grapped',
|
|
||||||
]),
|
|
||||||
])
|
])
|
||||||
->query(function (Builder $query, array $data): Builder {
|
->query(function (Builder $query, array $data): Builder {
|
||||||
return $query
|
return $query->when(
|
||||||
->when(
|
$data['year'],
|
||||||
$data['from'],
|
fn(Builder $query, $year): Builder => $query->whereYear('day', $year),
|
||||||
fn(Builder $query, $date): Builder => $query->whereDate('day', '>=', $date),
|
)->when(
|
||||||
)
|
$data['month'],
|
||||||
->when(
|
fn(Builder $query, $month): Builder => $query->whereMonth('day', $month),
|
||||||
$data['until'],
|
)->when(
|
||||||
fn(Builder $query, $date): Builder => $query->whereDate('day', '<=', $date),
|
$data['enabled'],
|
||||||
)->when(
|
fn(Builder $query, $enabled): Builder => $query->where('enabled', $enabled),
|
||||||
$data['sports-grapper'],
|
);
|
||||||
function (Builder $query, $sports_grapper) {
|
})->indicateUsing(function (array $data): array {
|
||||||
switch ($sports_grapper) {
|
$indicators = [];
|
||||||
case 1:
|
if ($data['year'] ?? null) {
|
||||||
return $query->where('football', 1);
|
$indicators[] = Indicator::make('Year: '.$data['year']);
|
||||||
case 2:
|
}
|
||||||
return $query->where('football', 0);
|
if ($data['month'] ?? null) {
|
||||||
case 3:
|
$indicators[] = Indicator::make('Month: '.$data['month']);
|
||||||
return $query->where('basketball', 1);
|
}
|
||||||
case 4:
|
return $indicators;
|
||||||
return $query->where('basketball', 0);
|
}),
|
||||||
case 5:
|
|
||||||
return $query->where('ice-hockey', 1);
|
|
||||||
case 6:
|
|
||||||
return $query->where('ice-hockey', 0);
|
|
||||||
case 7:
|
|
||||||
return $query->where('tennis', 1);
|
|
||||||
case 8:
|
|
||||||
return $query->where('tennis', 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
], layout: FiltersLayout::AboveContent)
|
], layout: FiltersLayout::AboveContent)
|
||||||
->deferFilters(false)
|
->deferFilters(false)
|
||||||
->recordActions([
|
->recordActions([
|
||||||
@@ -85,8 +75,22 @@ class SofaScoreDaysTable
|
|||||||
])
|
])
|
||||||
->toolbarActions([
|
->toolbarActions([
|
||||||
BulkActionGroup::make([
|
BulkActionGroup::make([
|
||||||
DeleteBulkAction::make(),
|
// DeleteBulkAction::make(),
|
||||||
]),
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function years() {
|
||||||
|
$years = range(date('Y'), date('Y')-10);
|
||||||
|
return array_combine($years, $years);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function month() {
|
||||||
|
$months = [];
|
||||||
|
for ($m = 1; $m <= 12; $m++) {
|
||||||
|
$date = Carbon::create(null, $m, 1);
|
||||||
|
$months[$date->format('m')] = $date->format('F');
|
||||||
|
}
|
||||||
|
return $months;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+1
@@ -25,6 +25,7 @@ class SofaScoreTournamentResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $navigationLabel = 'Tournaments';
|
protected static ?string $navigationLabel = 'Tournaments';
|
||||||
|
|
||||||
|
|
||||||
public static function form(Schema $schema): Schema
|
public static function form(Schema $schema): Schema
|
||||||
{
|
{
|
||||||
return SofaScoreTournamentForm::configure($schema);
|
return SofaScoreTournamentForm::configure($schema);
|
||||||
|
|||||||
+38
-11
@@ -6,13 +6,13 @@ use App\Models\SofaScoreCategorie;
|
|||||||
use App\Models\SofaScoreDayTournament;
|
use App\Models\SofaScoreDayTournament;
|
||||||
use App\Models\SofaScoreTournament;
|
use App\Models\SofaScoreTournament;
|
||||||
use App\Models\Sport;
|
use App\Models\Sport;
|
||||||
|
use Filament\Actions\Action;
|
||||||
use Filament\Actions\BulkAction;
|
use Filament\Actions\BulkAction;
|
||||||
use Filament\Actions\BulkActionGroup;
|
use Filament\Actions\BulkActionGroup;
|
||||||
use Filament\Forms\Components\DatePicker;
|
use Filament\Forms\Components\DatePicker;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Schemas\Components\Utilities\Get;
|
use Filament\Schemas\Components\Utilities\Get;
|
||||||
use Filament\Support\Enums\IconSize;
|
use Filament\Support\Enums\IconSize;
|
||||||
use Filament\Tables\Columns\CheckboxColumn;
|
|
||||||
use Filament\Tables\Columns\IconColumn;
|
use Filament\Tables\Columns\IconColumn;
|
||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
use Filament\Tables\Columns\ToggleColumn;
|
use Filament\Tables\Columns\ToggleColumn;
|
||||||
@@ -28,6 +28,32 @@ class SofaScoreTournamentsTable
|
|||||||
public static function configure(Table $table): Table
|
public static function configure(Table $table): Table
|
||||||
{
|
{
|
||||||
return $table
|
return $table
|
||||||
|
->headerActions([
|
||||||
|
Action::make('soccer')
|
||||||
|
->icon('phosphor-power')
|
||||||
|
->requiresConfirmation()
|
||||||
|
->modalDescription('This will disable all leagues for soccer')
|
||||||
|
->action(fn() => SofaScoreTournament::where('sport_id', 1)->update(['enabled' => 0])
|
||||||
|
),
|
||||||
|
Action::make('ice-hockey')
|
||||||
|
->icon('phosphor-power')
|
||||||
|
->requiresConfirmation()
|
||||||
|
->modalDescription('This will disable all leagues for ice hockey')
|
||||||
|
->action(fn() => SofaScoreTournament::where('sport_id', 2)->update(['enabled' => 0])
|
||||||
|
),
|
||||||
|
Action::make('basketball')
|
||||||
|
->icon('phosphor-power')
|
||||||
|
->requiresConfirmation()
|
||||||
|
->modalDescription('This will disable all leagues for basketball')
|
||||||
|
->action(fn() => SofaScoreTournament::where('sport_id', 3)->update(['enabled' => 0])
|
||||||
|
),
|
||||||
|
Action::make('tennis')
|
||||||
|
->icon('phosphor-power')
|
||||||
|
->requiresConfirmation()
|
||||||
|
->modalDescription('This will disable all leagues for tennis')
|
||||||
|
->action(fn() => SofaScoreTournament::where('sport_id', 5)->update(['enabled' => 0])
|
||||||
|
),
|
||||||
|
])
|
||||||
->poll()
|
->poll()
|
||||||
->columns([
|
->columns([
|
||||||
IconColumn::make('sport.icon')
|
IconColumn::make('sport.icon')
|
||||||
@@ -39,13 +65,12 @@ class SofaScoreTournamentsTable
|
|||||||
->size(IconSize::Medium)
|
->size(IconSize::Medium)
|
||||||
->tooltip(fn($record) => $record->id)
|
->tooltip(fn($record) => $record->id)
|
||||||
->visibleFrom('lg'),
|
->visibleFrom('lg'),
|
||||||
TextColumn::make('tournament_id'),
|
TextColumn::make('tournament_id')->sortable(),
|
||||||
TextColumn::make('sport.name'),
|
TextColumn::make('sport.name'),
|
||||||
TextColumn::make('sofascore_category.name')
|
TextColumn::make('sofascore_category.name')
|
||||||
->icon(fn($record) => $record->sofascore_category->country->icon),
|
->icon(fn($record) => $record->sofascore_category->country->icon),
|
||||||
TextColumn::make('name')->searchable()->sortable(),
|
TextColumn::make('name')->searchable()->sortable(),
|
||||||
ToggleColumn::make('grap')->tooltip('When active liga will be grapped'),
|
ToggleColumn::make('enabled'),
|
||||||
ToggleColumn::make('grapped')->onColor('success')->tooltip('When active liga has been grapped, to grap again disactivate'),
|
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
Filter::make('filters')
|
Filter::make('filters')
|
||||||
@@ -96,28 +121,30 @@ class SofaScoreTournamentsTable
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
TernaryFilter::make('grap')->placeholder('All')->label('Grapping'),
|
TernaryFilter::make('enabled')->placeholder('All'),
|
||||||
], layout: FiltersLayout::AboveContent)
|
], layout: FiltersLayout::AboveContent)
|
||||||
->deferFilters(false)
|
->deferFilters(false)
|
||||||
->toolbarActions([
|
->toolbarActions([
|
||||||
BulkActionGroup::make([
|
BulkActionGroup::make([
|
||||||
BulkAction::make('Grap On')
|
BulkAction::make('Enable')
|
||||||
->icon('phosphor-play')
|
->icon('phosphor-toggle-right-fill')
|
||||||
|
->color('primary')
|
||||||
->action(function (Collection $records): void {
|
->action(function (Collection $records): void {
|
||||||
foreach ($records as $record) {
|
foreach ($records as $record) {
|
||||||
SofaScoreTournament::where('id', '=', $record->id)
|
SofaScoreTournament::where('id', '=', $record->id)
|
||||||
->update(
|
->update(
|
||||||
['grap' => 1]
|
['enabled' => 1]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
BulkAction::make('Grap Off')
|
BulkAction::make('Disable')
|
||||||
->icon('phosphor-stop')
|
->icon('phosphor-toggle-left-fill')
|
||||||
|
->color('gray')
|
||||||
->action(function (Collection $records): void {
|
->action(function (Collection $records): void {
|
||||||
foreach ($records as $record) {
|
foreach ($records as $record) {
|
||||||
SofaScoreTournament::where('id', '=', $record->id)
|
SofaScoreTournament::where('id', '=', $record->id)
|
||||||
->update(
|
->update(
|
||||||
['grap' => 0]
|
['enabled' => 0]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -9,10 +9,12 @@ class SofaScoreDay extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'id',
|
'id',
|
||||||
'day',
|
'day',
|
||||||
'football',
|
'sport_id',
|
||||||
'basketball',
|
'enabled',
|
||||||
'tennis',
|
|
||||||
'ice-hockey',
|
|
||||||
'handball',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function sport()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Sport::class, 'sport_id', 'id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,8 +13,7 @@ class SofaScoreTournament extends Model
|
|||||||
'sofa_score_categorie_id',
|
'sofa_score_categorie_id',
|
||||||
'name',
|
'name',
|
||||||
'slug',
|
'slug',
|
||||||
'grap',
|
'enabled',
|
||||||
'grapped',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function sport()
|
public function sport()
|
||||||
|
|||||||
Generated
+40
-40
@@ -2196,26 +2196,26 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/guzzle",
|
"name": "guzzlehttp/guzzle",
|
||||||
"version": "7.12.1",
|
"version": "7.12.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/guzzle.git",
|
"url": "https://github.com/guzzle/guzzle.git",
|
||||||
"reference": "d34627490fbc03bf5c5d7cfed81f2faa19519425"
|
"reference": "9aa17bcdd777ee31df9fc83c337ca4ca2340def3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d34627490fbc03bf5c5d7cfed81f2faa19519425",
|
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/9aa17bcdd777ee31df9fc83c337ca4ca2340def3",
|
||||||
"reference": "d34627490fbc03bf5c5d7cfed81f2faa19519425",
|
"reference": "9aa17bcdd777ee31df9fc83c337ca4ca2340def3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"guzzlehttp/promises": "^2.5",
|
"guzzlehttp/promises": "^2.5",
|
||||||
"guzzlehttp/psr7": "^2.12.1",
|
"guzzlehttp/psr7": "^2.12.3",
|
||||||
"php": "^7.2.5 || ^8.0",
|
"php": "^7.2.5 || ^8.0",
|
||||||
"psr/http-client": "^1.0",
|
"psr/http-client": "^1.0",
|
||||||
"symfony/deprecation-contracts": "^2.5 || ^3.0",
|
"symfony/deprecation-contracts": "^2.5 || ^3.0",
|
||||||
"symfony/polyfill-php80": "^1.24"
|
"symfony/polyfill-php80": "^1.25"
|
||||||
},
|
},
|
||||||
"provide": {
|
"provide": {
|
||||||
"psr/http-client-implementation": "1.0"
|
"psr/http-client-implementation": "1.0"
|
||||||
@@ -2304,7 +2304,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||||
"source": "https://github.com/guzzle/guzzle/tree/7.12.1"
|
"source": "https://github.com/guzzle/guzzle/tree/7.12.3"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2320,7 +2320,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-06-18T14:12:49+00:00"
|
"time": "2026-06-23T15:29:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/promises",
|
"name": "guzzlehttp/promises",
|
||||||
@@ -2408,16 +2408,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/psr7",
|
"name": "guzzlehttp/psr7",
|
||||||
"version": "2.12.1",
|
"version": "2.12.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/psr7.git",
|
"url": "https://github.com/guzzle/psr7.git",
|
||||||
"reference": "172ef2f4e9824c1e058b7f30be8ae25a02c0f2b7"
|
"reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/172ef2f4e9824c1e058b7f30be8ae25a02c0f2b7",
|
"url": "https://api.github.com/repos/guzzle/psr7/zipball/7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
|
||||||
"reference": "172ef2f4e9824c1e058b7f30be8ae25a02c0f2b7",
|
"reference": "7ec62dc3f44aa218487dbed81a9bf9bc647be55d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2426,7 +2426,7 @@
|
|||||||
"psr/http-message": "^1.1 || ^2.0",
|
"psr/http-message": "^1.1 || ^2.0",
|
||||||
"ralouphie/getallheaders": "^3.0",
|
"ralouphie/getallheaders": "^3.0",
|
||||||
"symfony/deprecation-contracts": "^2.5 || ^3.0",
|
"symfony/deprecation-contracts": "^2.5 || ^3.0",
|
||||||
"symfony/polyfill-php80": "^1.24"
|
"symfony/polyfill-php80": "^1.25"
|
||||||
},
|
},
|
||||||
"provide": {
|
"provide": {
|
||||||
"psr/http-factory-implementation": "1.0",
|
"psr/http-factory-implementation": "1.0",
|
||||||
@@ -2507,7 +2507,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/psr7/issues",
|
"issues": "https://github.com/guzzle/psr7/issues",
|
||||||
"source": "https://github.com/guzzle/psr7/tree/2.12.1"
|
"source": "https://github.com/guzzle/psr7/tree/2.12.3"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2523,25 +2523,25 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-06-18T09:49:37+00:00"
|
"time": "2026-06-23T15:21:08+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/uri-template",
|
"name": "guzzlehttp/uri-template",
|
||||||
"version": "v1.0.7",
|
"version": "v1.0.8",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/uri-template.git",
|
"url": "https://github.com/guzzle/uri-template.git",
|
||||||
"reference": "7fe811c23a9e3cd712b4389eaeb50b5456d8c529"
|
"reference": "9c19128923b05a5d7355e5d2318d7808b7e33bbd"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/uri-template/zipball/7fe811c23a9e3cd712b4389eaeb50b5456d8c529",
|
"url": "https://api.github.com/repos/guzzle/uri-template/zipball/9c19128923b05a5d7355e5d2318d7808b7e33bbd",
|
||||||
"reference": "7fe811c23a9e3cd712b4389eaeb50b5456d8c529",
|
"reference": "9c19128923b05a5d7355e5d2318d7808b7e33bbd",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2.5 || ^8.0",
|
"php": "^7.2.5 || ^8.0",
|
||||||
"symfony/polyfill-php80": "^1.24"
|
"symfony/polyfill-php80": "^1.25"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||||
@@ -2593,7 +2593,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/guzzle/uri-template/issues",
|
"issues": "https://github.com/guzzle/uri-template/issues",
|
||||||
"source": "https://github.com/guzzle/uri-template/tree/v1.0.7"
|
"source": "https://github.com/guzzle/uri-template/tree/v1.0.8"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2609,7 +2609,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-06-12T21:33:43+00:00"
|
"time": "2026-06-23T13:02:23+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jaybizzle/crawler-detect",
|
"name": "jaybizzle/crawler-detect",
|
||||||
@@ -3576,16 +3576,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
"version": "3.34.0",
|
"version": "3.35.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/flysystem.git",
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
"reference": "2daaac3b0d4c83ea7ed5d8586e786f5d00f3540e"
|
"reference": "d0a405f03d980461e4b6e08cfed2c162650f9f6b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/2daaac3b0d4c83ea7ed5d8586e786f5d00f3540e",
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/d0a405f03d980461e4b6e08cfed2c162650f9f6b",
|
||||||
"reference": "2daaac3b0d4c83ea7ed5d8586e786f5d00f3540e",
|
"reference": "d0a405f03d980461e4b6e08cfed2c162650f9f6b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3653,9 +3653,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||||
"source": "https://github.com/thephpleague/flysystem/tree/3.34.0"
|
"source": "https://github.com/thephpleague/flysystem/tree/3.35.0"
|
||||||
},
|
},
|
||||||
"time": "2026-05-14T10:28:08+00:00"
|
"time": "2026-06-22T20:12:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem-local",
|
"name": "league/flysystem-local",
|
||||||
@@ -4106,16 +4106,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "masterminds/html5",
|
"name": "masterminds/html5",
|
||||||
"version": "2.10.0",
|
"version": "2.10.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Masterminds/html5-php.git",
|
"url": "https://github.com/Masterminds/html5-php.git",
|
||||||
"reference": "fcf91eb64359852f00d921887b219479b4f21251"
|
"reference": "fd5018f6815fff903946d0564977b44ce8010e29"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/fcf91eb64359852f00d921887b219479b4f21251",
|
"url": "https://api.github.com/repos/Masterminds/html5-php/zipball/fd5018f6815fff903946d0564977b44ce8010e29",
|
||||||
"reference": "fcf91eb64359852f00d921887b219479b4f21251",
|
"reference": "fd5018f6815fff903946d0564977b44ce8010e29",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -4123,7 +4123,7 @@
|
|||||||
"php": ">=5.3.0"
|
"php": ">=5.3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9"
|
"phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9 || ^10"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -4167,9 +4167,9 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/Masterminds/html5-php/issues",
|
"issues": "https://github.com/Masterminds/html5-php/issues",
|
||||||
"source": "https://github.com/Masterminds/html5-php/tree/2.10.0"
|
"source": "https://github.com/Masterminds/html5-php/tree/2.10.1"
|
||||||
},
|
},
|
||||||
"time": "2025-07-25T09:04:22+00:00"
|
"time": "2026-06-23T18:43:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "maxmind-db/reader",
|
"name": "maxmind-db/reader",
|
||||||
@@ -10468,16 +10468,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/sail",
|
"name": "laravel/sail",
|
||||||
"version": "v1.62.0",
|
"version": "v1.63.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/sail.git",
|
"url": "https://github.com/laravel/sail.git",
|
||||||
"reference": "3aaeefc979f8ba6586fbc5b6e0b1b3638058f98e"
|
"reference": "51bbce3f803c1d386cabbb44e618c955a12ff5fc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/sail/zipball/3aaeefc979f8ba6586fbc5b6e0b1b3638058f98e",
|
"url": "https://api.github.com/repos/laravel/sail/zipball/51bbce3f803c1d386cabbb44e618c955a12ff5fc",
|
||||||
"reference": "3aaeefc979f8ba6586fbc5b6e0b1b3638058f98e",
|
"reference": "51bbce3f803c1d386cabbb44e618c955a12ff5fc",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -10527,7 +10527,7 @@
|
|||||||
"issues": "https://github.com/laravel/sail/issues",
|
"issues": "https://github.com/laravel/sail/issues",
|
||||||
"source": "https://github.com/laravel/sail"
|
"source": "https://github.com/laravel/sail"
|
||||||
},
|
},
|
||||||
"time": "2026-05-27T04:02:01+00:00"
|
"time": "2026-06-18T08:54:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mockery/mockery",
|
"name": "mockery/mockery",
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ return new class extends Migration
|
|||||||
$table->integer('sofa_score_categorie_id')->index();
|
$table->integer('sofa_score_categorie_id')->index();
|
||||||
$table->string('slug')->index();
|
$table->string('slug')->index();
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->boolean('grap')->index()->default(0);
|
$table->boolean('enabled')->index()->default(0);
|
||||||
$table->boolean('grapped')->index()->default(0);
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,11 +14,8 @@ return new class extends Migration
|
|||||||
Schema::create('sofa_score_days', function (Blueprint $table) {
|
Schema::create('sofa_score_days', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->date('day')->index();
|
$table->date('day')->index();
|
||||||
$table->boolean('football')->default(0);
|
$table->integer('sport_id')->index()->references('id')->on('sports');
|
||||||
$table->boolean('basketball')->default(0);
|
$table->boolean('enabled')->index()->default(0);
|
||||||
$table->boolean('tennis')->default(0);
|
|
||||||
$table->boolean('ice-hockey')->default(0);
|
|
||||||
$table->boolean('handball')->default(0);
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user