comparatore bookmaker odds wip
No files matched your search
@@ -8,5 +8,5 @@ use Filament\Support\Icons\Heroicon;
|
|||||||
|
|
||||||
class SettingsCluster extends Cluster
|
class SettingsCluster extends Cluster
|
||||||
{
|
{
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedSquares2x2;
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::AdjustmentsHorizontal;
|
||||||
}
|
}
|
||||||
@@ -23,13 +23,10 @@ class BettypeResource extends Resource
|
|||||||
|
|
||||||
protected static string|\UnitEnum|null $navigationGroup = 'Static Data';
|
protected static string|\UnitEnum|null $navigationGroup = 'Static Data';
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Bettype';
|
public static function canViewAny(): bool
|
||||||
|
{
|
||||||
protected static ?string $modelLabel = 'Bettype';
|
return auth()->user()->super_admin == 1;
|
||||||
|
}
|
||||||
protected static ?string $title = 'Bettype';
|
|
||||||
|
|
||||||
protected static ?string $pluralModelLabel = 'Bettypes';
|
|
||||||
|
|
||||||
public static function form(Schema $schema): Schema
|
public static function form(Schema $schema): Schema
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use App\Filament\Resources\Events\Pages\ListEvents;
|
|||||||
use App\Filament\Resources\Events\Schemas\EventForm;
|
use App\Filament\Resources\Events\Schemas\EventForm;
|
||||||
use App\Filament\Resources\Events\Tables\EventsTable;
|
use App\Filament\Resources\Events\Tables\EventsTable;
|
||||||
use App\Models\Event;
|
use App\Models\Event;
|
||||||
|
use App\Models\Multiline;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Filament\Resources\Resource;
|
use Filament\Resources\Resource;
|
||||||
use Filament\Schemas\Schema;
|
use Filament\Schemas\Schema;
|
||||||
@@ -57,14 +58,24 @@ class EventResource extends Resource
|
|||||||
|
|
||||||
public static function getNavigationBadge(): ?string
|
public static function getNavigationBadge(): ?string
|
||||||
{
|
{
|
||||||
return parent::getEloquentQuery()->withoutGlobalScopes()->where('starttime', '>', Carbon::now())->count();
|
return parent::getEloquentQuery()
|
||||||
|
->where('sport_id', auth()->user()->sport_id)
|
||||||
|
->where('starttime', '>', Carbon::now())
|
||||||
|
->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getEloquentQuery(): Builder
|
public static function getEloquentQuery(): Builder
|
||||||
{
|
{
|
||||||
|
// $_bookmaker = Multiline::where('sport_id', auth()->user()->sport_id)
|
||||||
|
// ->where('client_id', auth()->user()->client_id)
|
||||||
|
// ->where('bettype_id', 1)
|
||||||
|
// ->where('matchpart_id', 1)
|
||||||
|
// ->pluck('bookmaker_id')
|
||||||
|
// ->toArray();
|
||||||
|
|
||||||
return parent::getEloquentQuery()
|
return parent::getEloquentQuery()
|
||||||
|
// ->join('odds_3ways', 'odds_3ways.event_id', '=', 'events.id')
|
||||||
->where('starttime', '>', Carbon::now())
|
->where('starttime', '>', Carbon::now())
|
||||||
->where('sport_id', auth()->user()->sport_id)
|
->where('sport_id', auth()->user()->sport_id);
|
||||||
->withoutGlobalScopes()->with('odds_3way');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ class EventsTable
|
|||||||
->width('1rem')
|
->width('1rem')
|
||||||
->size(IconSize::ExtraLarge)
|
->size(IconSize::ExtraLarge)
|
||||||
->icon(fn ($record) => $record->sport->icon)
|
->icon(fn ($record) => $record->sport->icon)
|
||||||
->tooltip(fn ($record) => $record->txodds_id),
|
->tooltip(fn ($record) => $record->id),
|
||||||
TextColumn::make('txodds_id')->searchable()->label('Match Id')->badge()->copyable(),
|
TextColumn::make('txodds_id')->searchable()->label('Match Id')->badge()->copyable(),
|
||||||
TextColumn::make('starttime')
|
TextColumn::make('starttime')
|
||||||
->label('Start')
|
->label('Start')
|
||||||
@@ -41,7 +41,8 @@ class EventsTable
|
|||||||
->description(fn ($record) => $record->competition_group->name),
|
->description(fn ($record) => $record->competition_group->name),
|
||||||
TextColumn::make('home.name')->alignRight()->searchable(),
|
TextColumn::make('home.name')->alignRight()->searchable(),
|
||||||
TextColumn::make('away.name')->searchable(),
|
TextColumn::make('away.name')->searchable(),
|
||||||
Odds3Way::make('3way')->label('1 X 2')->alignCenter(),
|
|
||||||
|
Odds3Way::make('odds_3way')->label('Market 1X2'),
|
||||||
])
|
])
|
||||||
->filters([
|
->filters([
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\Multilines;
|
||||||
|
|
||||||
|
use App\Filament\Clusters\Settings\SettingsCluster;
|
||||||
|
use App\Filament\Resources\Multilines\Pages\ListMultilines;
|
||||||
|
use App\Filament\Resources\Multilines\Schemas\MultilineForm;
|
||||||
|
use App\Filament\Resources\Multilines\Tables\MultilinesTable;
|
||||||
|
use App\Models\Multiline;
|
||||||
|
use BackedEnum;
|
||||||
|
use Filament\Resources\Resource;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
use Filament\Support\Icons\Heroicon;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
|
class MultilineResource extends Resource
|
||||||
|
{
|
||||||
|
protected static ?string $model = Multiline::class;
|
||||||
|
|
||||||
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::Bars3;
|
||||||
|
|
||||||
|
protected static ?string $cluster = SettingsCluster::class;
|
||||||
|
|
||||||
|
// protected static string|\UnitEnum|null $navigationGroup = 'Settings';
|
||||||
|
|
||||||
|
public static function form(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return MultilineForm::configure($schema);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function table(Table $table): Table
|
||||||
|
{
|
||||||
|
return MultilinesTable::configure($table);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getPages(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'index' => ListMultilines::route('/'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\Multilines\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\Multilines\MultilineResource;
|
||||||
|
use Filament\Resources\Pages\CreateRecord;
|
||||||
|
|
||||||
|
class CreateMultiline extends CreateRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = MultilineResource::class;
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\Multilines\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\Multilines\MultilineResource;
|
||||||
|
use Filament\Actions\DeleteAction;
|
||||||
|
use Filament\Resources\Pages\EditRecord;
|
||||||
|
|
||||||
|
class EditMultiline extends EditRecord
|
||||||
|
{
|
||||||
|
protected static string $resource = MultilineResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
DeleteAction::make(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\Multilines\Pages;
|
||||||
|
|
||||||
|
use App\Filament\Resources\Multilines\MultilineResource;
|
||||||
|
use Filament\Actions\CreateAction;
|
||||||
|
use Filament\Resources\Pages\ListRecords;
|
||||||
|
|
||||||
|
class ListMultilines extends ListRecords
|
||||||
|
{
|
||||||
|
protected static string $resource = MultilineResource::class;
|
||||||
|
|
||||||
|
protected function getHeaderActions(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
CreateAction::make()
|
||||||
|
->createAnother(false)
|
||||||
|
->hidden(! auth()->user()->super_admin),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\Multilines\Schemas;
|
||||||
|
|
||||||
|
use App\Models\Bettype;
|
||||||
|
use App\Models\Bookmaker;
|
||||||
|
use App\Models\Matchpart;
|
||||||
|
use App\Models\Sport;
|
||||||
|
use Filament\Forms\Components\Select;
|
||||||
|
use Filament\Schemas\Components\Utilities\Get;
|
||||||
|
use Filament\Schemas\Schema;
|
||||||
|
|
||||||
|
class MultilineForm
|
||||||
|
{
|
||||||
|
public static $bettypes = [1, 2, 3, 4, 16, 2001, 2002, 2021, 3001, 3002, 3021];
|
||||||
|
|
||||||
|
public static function configure(Schema $schema): Schema
|
||||||
|
{
|
||||||
|
return $schema
|
||||||
|
->components([
|
||||||
|
Select::make('sport_id')
|
||||||
|
->live()
|
||||||
|
->options(Sport::where('is_active', 1)->pluck('name', 'id'))
|
||||||
|
->preload(),
|
||||||
|
Select::make('matchpart_id')
|
||||||
|
->options(Matchpart::where('is_active', 1)->pluck('name', 'id'))
|
||||||
|
->preload(),
|
||||||
|
Select::make('bettype_id')
|
||||||
|
->options(fn (Get $get) => Bettype::where('sport_id', $get('sport_id'))->whereIn('bettype_id', self::$bettypes)->pluck('name', 'bettype_id')),
|
||||||
|
Select::make('bookmaker_id')
|
||||||
|
->options(Bookmaker::where('is_active', 1)->pluck('name', 'txid'))
|
||||||
|
->preload()
|
||||||
|
->searchable(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Resources\Multilines\Tables;
|
||||||
|
|
||||||
|
use App\Filament\Tables\Columns\BookmakerIcon;
|
||||||
|
use Filament\Actions\Action;
|
||||||
|
use Filament\Actions\EditAction;
|
||||||
|
use Filament\Tables\Columns\IconColumn;
|
||||||
|
use Filament\Tables\Columns\TextColumn;
|
||||||
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
|
class MultilinesTable
|
||||||
|
{
|
||||||
|
public static function configure(Table $table): Table
|
||||||
|
{
|
||||||
|
return $table
|
||||||
|
->reorderRecordsTriggerAction(
|
||||||
|
fn (Action $action, bool $isReordering) => $action
|
||||||
|
->button()
|
||||||
|
->label($isReordering ? 'Disable reordering' : 'Enable reordering'),
|
||||||
|
)
|
||||||
|
->reorderable('sort')
|
||||||
|
->columns([
|
||||||
|
IconColumn::make('sport.icon')
|
||||||
|
->label('')
|
||||||
|
->width('1rem')
|
||||||
|
->icon(function ($record): string {
|
||||||
|
return $record->sport->icon;
|
||||||
|
}),
|
||||||
|
TextColumn::make('sport.name'),
|
||||||
|
TextColumn::make('matchpart.name'),
|
||||||
|
TextColumn::make('bettype.name'),
|
||||||
|
TextColumn::make('bookmaker.name'),
|
||||||
|
BookmakerIcon::make('bookmaker.icon')->label('Icon'),
|
||||||
|
])
|
||||||
|
->filters([
|
||||||
|
//
|
||||||
|
])
|
||||||
|
->recordActions([
|
||||||
|
EditAction::make()
|
||||||
|
->mutateDataUsing(function (array $data): array {
|
||||||
|
$data['client_id'] = auth()->user()->client_id;
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Tables\Columns;
|
||||||
|
|
||||||
|
use Filament\Tables\Columns\Column;
|
||||||
|
|
||||||
|
class BookmakerIcon extends Column
|
||||||
|
{
|
||||||
|
protected string $view = 'filament.tables.columns.bookmaker-icon';
|
||||||
|
}
|
||||||
@@ -10,4 +10,9 @@ class Bettype extends Model
|
|||||||
{
|
{
|
||||||
return $this->belongsTo(Sport::class);
|
return $this->belongsTo(Sport::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function matchpart()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Matchpart::class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -52,6 +52,15 @@ class Event extends Model
|
|||||||
|
|
||||||
public function odds_3way()
|
public function odds_3way()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Odds3way::class);
|
$_bookmaker = Multiline::where('sport_id', auth()->user()->sport_id)
|
||||||
|
->where('client_id', auth()->user()->client_id)
|
||||||
|
->where('bettype_id', 1)
|
||||||
|
->where('matchpart_id', 1)
|
||||||
|
->pluck('bookmaker_id');
|
||||||
|
|
||||||
|
return $this->hasMany(Odds3way::class, 'event_id', 'id')
|
||||||
|
->join('multilines', 'multilines.bookmaker_id', 'odds_3ways.bookmaker_id')
|
||||||
|
->orderBy('multilines.sort');
|
||||||
|
// return $this->hasMany(Odds3way::class, 'event_id', 'id')->whereIn('bookmaker_id', $_bookmaker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Matchpart extends Model {}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Multiline extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = [
|
||||||
|
'client_id',
|
||||||
|
'sport_id',
|
||||||
|
'bettype_id',
|
||||||
|
'matchpart_id',
|
||||||
|
'bookmaker_id',
|
||||||
|
'sort',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function sport()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Sport::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function matchpart()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Matchpart::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bettype()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Bettype::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bookmaker()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Bookmaker::class, 'bookmaker_id', 'txid');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -35,7 +35,7 @@ class Odds3way extends Model
|
|||||||
|
|
||||||
public function bookmaker()
|
public function bookmaker()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Bookmaker::class);
|
return $this->belongsTo(Bookmaker::class, 'bookmaker_id', 'txid');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function event()
|
public function event()
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Utilities;
|
||||||
|
|
||||||
|
class BkmIconMap
|
||||||
|
{
|
||||||
|
public static function get($bookmaker)
|
||||||
|
{
|
||||||
|
if ($bookmaker) {
|
||||||
|
return asset("storage/bookmaker-icons/$bookmaker->icon.png");
|
||||||
|
} else {
|
||||||
|
return asset('storage/bookmaker-icons/missing.png');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Utilities;
|
|
||||||
|
|
||||||
class BookmakerIcon
|
|
||||||
{
|
|
||||||
public static function byId($bkmid)
|
|
||||||
{
|
|
||||||
$image = '';
|
|
||||||
switch ($bkmid) {
|
|
||||||
case 5:
|
|
||||||
$image = 'expekt.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 6:
|
|
||||||
$image = 'unibet.jpg';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 13:
|
|
||||||
$image = 'sportingbet.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 17:
|
|
||||||
$image = 'ladbrokes.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 30:
|
|
||||||
$image = 'bwin.jpg';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 42:
|
|
||||||
$image = 'willhill.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 110:
|
|
||||||
$image = 'betfair.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 314:
|
|
||||||
$image = 'matchbook.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 327:
|
|
||||||
$image = 'sbobet.jpg';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 388:
|
|
||||||
$image = 'eurobet.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 539:
|
|
||||||
$image = 'marathonbet.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 649:
|
|
||||||
$image = '1xbet.jpg';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 658:
|
|
||||||
$image = 'bet9ja.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 823:
|
|
||||||
$image = 'betking.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 824:
|
|
||||||
$image = 'betplay.jpg';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 825:
|
|
||||||
$image = 'sportybet.png';
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
$image = 'missing.png';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return asset("storage/bookmaker-icons/$image");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -23,6 +23,9 @@
|
|||||||
'app.filament.resources.group-filters.pages.create-group-filter' => 'App\\Filament\\Resources\\GroupFilters\\Pages\\CreateGroupFilter',
|
'app.filament.resources.group-filters.pages.create-group-filter' => 'App\\Filament\\Resources\\GroupFilters\\Pages\\CreateGroupFilter',
|
||||||
'app.filament.resources.group-filters.pages.edit-group-filter' => 'App\\Filament\\Resources\\GroupFilters\\Pages\\EditGroupFilter',
|
'app.filament.resources.group-filters.pages.edit-group-filter' => 'App\\Filament\\Resources\\GroupFilters\\Pages\\EditGroupFilter',
|
||||||
'app.filament.resources.group-filters.pages.list-group-filters' => 'App\\Filament\\Resources\\GroupFilters\\Pages\\ListGroupFilters',
|
'app.filament.resources.group-filters.pages.list-group-filters' => 'App\\Filament\\Resources\\GroupFilters\\Pages\\ListGroupFilters',
|
||||||
|
'app.filament.resources.multilines.pages.create-multiline' => 'App\\Filament\\Resources\\Multilines\\Pages\\CreateMultiline',
|
||||||
|
'app.filament.resources.multilines.pages.edit-multiline' => 'App\\Filament\\Resources\\Multilines\\Pages\\EditMultiline',
|
||||||
|
'app.filament.resources.multilines.pages.list-multilines' => 'App\\Filament\\Resources\\Multilines\\Pages\\ListMultilines',
|
||||||
'app.filament.resources.providers.pages.create-provider' => 'App\\Filament\\Resources\\Providers\\Pages\\CreateProvider',
|
'app.filament.resources.providers.pages.create-provider' => 'App\\Filament\\Resources\\Providers\\Pages\\CreateProvider',
|
||||||
'app.filament.resources.providers.pages.edit-provider' => 'App\\Filament\\Resources\\Providers\\Pages\\EditProvider',
|
'app.filament.resources.providers.pages.edit-provider' => 'App\\Filament\\Resources\\Providers\\Pages\\EditProvider',
|
||||||
'app.filament.resources.providers.pages.list-providers' => 'App\\Filament\\Resources\\Providers\\Pages\\ListProviders',
|
'app.filament.resources.providers.pages.list-providers' => 'App\\Filament\\Resources\\Providers\\Pages\\ListProviders',
|
||||||
@@ -77,6 +80,10 @@
|
|||||||
1 => 'App\\Filament\\Resources\\ElementFilters\\ElementFilterResource',
|
1 => 'App\\Filament\\Resources\\ElementFilters\\ElementFilterResource',
|
||||||
2 => 'App\\Filament\\Resources\\GroupFilters\\GroupFilterResource',
|
2 => 'App\\Filament\\Resources\\GroupFilters\\GroupFilterResource',
|
||||||
),
|
),
|
||||||
|
'App\\Filament\\Clusters\\Settings\\SettingsCluster' =>
|
||||||
|
array (
|
||||||
|
0 => 'App\\Filament\\Resources\\Multilines\\MultilineResource',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
'clusterDirectories' =>
|
'clusterDirectories' =>
|
||||||
array (
|
array (
|
||||||
@@ -112,6 +119,7 @@
|
|||||||
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/ElementFilters/ElementFilterResource.php' => 'App\\Filament\\Resources\\ElementFilters\\ElementFilterResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/ElementFilters/ElementFilterResource.php' => 'App\\Filament\\Resources\\ElementFilters\\ElementFilterResource',
|
||||||
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Events/EventResource.php' => 'App\\Filament\\Resources\\Events\\EventResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Events/EventResource.php' => 'App\\Filament\\Resources\\Events\\EventResource',
|
||||||
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/GroupFilters/GroupFilterResource.php' => 'App\\Filament\\Resources\\GroupFilters\\GroupFilterResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/GroupFilters/GroupFilterResource.php' => 'App\\Filament\\Resources\\GroupFilters\\GroupFilterResource',
|
||||||
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Multilines/MultilineResource.php' => 'App\\Filament\\Resources\\Multilines\\MultilineResource',
|
||||||
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Providers/ProviderResource.php' => 'App\\Filament\\Resources\\Providers\\ProviderResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Providers/ProviderResource.php' => 'App\\Filament\\Resources\\Providers\\ProviderResource',
|
||||||
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Sports/SportResource.php' => 'App\\Filament\\Resources\\Sports\\SportResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Sports/SportResource.php' => 'App\\Filament\\Resources\\Sports\\SportResource',
|
||||||
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Supervisors/SupervisorResource.php' => 'App\\Filament\\Resources\\Supervisors\\SupervisorResource',
|
'/Users/salam/Sites/nuhodds_fi4/app/Filament/Resources/Supervisors/SupervisorResource.php' => 'App\\Filament\\Resources\\Supervisors\\SupervisorResource',
|
||||||
|
|||||||
@@ -426,6 +426,26 @@ app('router')->setCompiledRoutes(
|
|||||||
6 => NULL,
|
6 => NULL,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
'/settings/multilines' =>
|
||||||
|
array (
|
||||||
|
0 =>
|
||||||
|
array (
|
||||||
|
0 =>
|
||||||
|
array (
|
||||||
|
'_route' => 'filament.admin.settings.resources.multilines.index',
|
||||||
|
),
|
||||||
|
1 => NULL,
|
||||||
|
2 =>
|
||||||
|
array (
|
||||||
|
'GET' => 0,
|
||||||
|
'HEAD' => 1,
|
||||||
|
),
|
||||||
|
3 => NULL,
|
||||||
|
4 => false,
|
||||||
|
5 => false,
|
||||||
|
6 => NULL,
|
||||||
|
),
|
||||||
|
),
|
||||||
'/administrator/providers' =>
|
'/administrator/providers' =>
|
||||||
array (
|
array (
|
||||||
0 =>
|
0 =>
|
||||||
@@ -531,7 +551,7 @@ app('router')->setCompiledRoutes(
|
|||||||
array (
|
array (
|
||||||
0 =>
|
0 =>
|
||||||
array (
|
array (
|
||||||
'_route' => 'generated::28iQGrHtfygW5Ygm',
|
'_route' => 'generated::utvoDsmittGErgFU',
|
||||||
),
|
),
|
||||||
1 => NULL,
|
1 => NULL,
|
||||||
2 =>
|
2 =>
|
||||||
@@ -551,7 +571,7 @@ app('router')->setCompiledRoutes(
|
|||||||
array (
|
array (
|
||||||
0 =>
|
0 =>
|
||||||
array (
|
array (
|
||||||
'_route' => 'generated::9rHVcl6FtqTFiiV5',
|
'_route' => 'generated::UKTOkgCt6yIOAG79',
|
||||||
),
|
),
|
||||||
1 => NULL,
|
1 => NULL,
|
||||||
2 =>
|
2 =>
|
||||||
@@ -590,7 +610,7 @@ app('router')->setCompiledRoutes(
|
|||||||
array (
|
array (
|
||||||
0 =>
|
0 =>
|
||||||
array (
|
array (
|
||||||
'_route' => 'generated::Pg2kZhzUQX5UOGsb',
|
'_route' => 'generated::qXNgDXoLuA95HjrL',
|
||||||
),
|
),
|
||||||
1 => NULL,
|
1 => NULL,
|
||||||
2 =>
|
2 =>
|
||||||
@@ -2279,6 +2299,60 @@ app('router')->setCompiledRoutes(
|
|||||||
'waitSeconds' => NULL,
|
'waitSeconds' => NULL,
|
||||||
'withTrashed' => false,
|
'withTrashed' => false,
|
||||||
),
|
),
|
||||||
|
'filament.admin.settings.resources.multilines.index' =>
|
||||||
|
array (
|
||||||
|
'methods' =>
|
||||||
|
array (
|
||||||
|
0 => 'GET',
|
||||||
|
1 => 'HEAD',
|
||||||
|
),
|
||||||
|
'uri' => 'settings/multilines',
|
||||||
|
'action' =>
|
||||||
|
array (
|
||||||
|
'domain' => NULL,
|
||||||
|
'middleware' =>
|
||||||
|
array (
|
||||||
|
0 => 'panel:admin',
|
||||||
|
1 => 'Illuminate\\Cookie\\Middleware\\EncryptCookies',
|
||||||
|
2 => 'Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse',
|
||||||
|
3 => 'Illuminate\\Session\\Middleware\\StartSession',
|
||||||
|
4 => 'Filament\\Http\\Middleware\\AuthenticateSession',
|
||||||
|
5 => 'Illuminate\\View\\Middleware\\ShareErrorsFromSession',
|
||||||
|
6 => 'Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken',
|
||||||
|
7 => 'Illuminate\\Routing\\Middleware\\SubstituteBindings',
|
||||||
|
8 => 'Filament\\Http\\Middleware\\DisableBladeIconComponents',
|
||||||
|
9 => 'Filament\\Http\\Middleware\\DispatchServingFilamentEvent',
|
||||||
|
10 => 'Filament\\Http\\Middleware\\Authenticate',
|
||||||
|
11 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserThemeColor:web',
|
||||||
|
12 => 'Joaopaulolndev\\FilamentEditProfile\\Http\\Middleware\\SetUserLocale:web',
|
||||||
|
13 => 'verified:filament.admin.auth.email-verification.prompt',
|
||||||
|
),
|
||||||
|
'excluded_middleware' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'uses' => 'App\\Filament\\Resources\\Multilines\\Pages\\ListMultilines@__invoke',
|
||||||
|
'controller' => 'App\\Filament\\Resources\\Multilines\\Pages\\ListMultilines',
|
||||||
|
'as' => 'filament.admin.settings.resources.multilines.index',
|
||||||
|
'namespace' => NULL,
|
||||||
|
'prefix' => 'settings/multilines',
|
||||||
|
'where' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'fallback' => false,
|
||||||
|
'defaults' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'wheres' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'bindingFields' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'lockSeconds' => NULL,
|
||||||
|
'waitSeconds' => NULL,
|
||||||
|
'withTrashed' => false,
|
||||||
|
),
|
||||||
'filament.admin.administrator.resources.providers.index' =>
|
'filament.admin.administrator.resources.providers.index' =>
|
||||||
array (
|
array (
|
||||||
'methods' =>
|
'methods' =>
|
||||||
@@ -2526,7 +2600,7 @@ app('router')->setCompiledRoutes(
|
|||||||
'waitSeconds' => NULL,
|
'waitSeconds' => NULL,
|
||||||
'withTrashed' => false,
|
'withTrashed' => false,
|
||||||
),
|
),
|
||||||
'generated::28iQGrHtfygW5Ygm' =>
|
'generated::utvoDsmittGErgFU' =>
|
||||||
array (
|
array (
|
||||||
'methods' =>
|
'methods' =>
|
||||||
array (
|
array (
|
||||||
@@ -2538,7 +2612,7 @@ app('router')->setCompiledRoutes(
|
|||||||
array (
|
array (
|
||||||
'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile',
|
'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile',
|
||||||
'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile',
|
'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@returnJavaScriptAsFile',
|
||||||
'as' => 'generated::28iQGrHtfygW5Ygm',
|
'as' => 'generated::utvoDsmittGErgFU',
|
||||||
),
|
),
|
||||||
'fallback' => false,
|
'fallback' => false,
|
||||||
'defaults' =>
|
'defaults' =>
|
||||||
@@ -2554,7 +2628,7 @@ app('router')->setCompiledRoutes(
|
|||||||
'waitSeconds' => NULL,
|
'waitSeconds' => NULL,
|
||||||
'withTrashed' => false,
|
'withTrashed' => false,
|
||||||
),
|
),
|
||||||
'generated::9rHVcl6FtqTFiiV5' =>
|
'generated::UKTOkgCt6yIOAG79' =>
|
||||||
array (
|
array (
|
||||||
'methods' =>
|
'methods' =>
|
||||||
array (
|
array (
|
||||||
@@ -2566,7 +2640,7 @@ app('router')->setCompiledRoutes(
|
|||||||
array (
|
array (
|
||||||
'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps',
|
'uses' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps',
|
||||||
'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps',
|
'controller' => 'Livewire\\Mechanisms\\FrontendAssets\\FrontendAssets@maps',
|
||||||
'as' => 'generated::9rHVcl6FtqTFiiV5',
|
'as' => 'generated::UKTOkgCt6yIOAG79',
|
||||||
),
|
),
|
||||||
'fallback' => false,
|
'fallback' => false,
|
||||||
'defaults' =>
|
'defaults' =>
|
||||||
@@ -2637,7 +2711,7 @@ app('router')->setCompiledRoutes(
|
|||||||
'waitSeconds' => NULL,
|
'waitSeconds' => NULL,
|
||||||
'withTrashed' => false,
|
'withTrashed' => false,
|
||||||
),
|
),
|
||||||
'generated::Pg2kZhzUQX5UOGsb' =>
|
'generated::qXNgDXoLuA95HjrL' =>
|
||||||
array (
|
array (
|
||||||
'methods' =>
|
'methods' =>
|
||||||
array (
|
array (
|
||||||
@@ -2665,8 +2739,8 @@ app('router')->setCompiledRoutes(
|
|||||||
return response(\\Illuminate\\Support\\Facades\\View::file(\'/Users/salam/Sites/nuhodds_fi4/vendor/laravel/framework/src/Illuminate/Foundation/Configuration\'.\'/../resources/health-up.blade.php\', [
|
return response(\\Illuminate\\Support\\Facades\\View::file(\'/Users/salam/Sites/nuhodds_fi4/vendor/laravel/framework/src/Illuminate/Foundation/Configuration\'.\'/../resources/health-up.blade.php\', [
|
||||||
\'exception\' => $exception,
|
\'exception\' => $exception,
|
||||||
]), status: $exception ? 500 : 200);
|
]), status: $exception ? 500 : 200);
|
||||||
}";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000000dfc0000000000000000";}}',
|
}";s:5:"scope";s:54:"Illuminate\\Foundation\\Configuration\\ApplicationBuilder";s:4:"this";N;s:4:"self";s:32:"0000000000000e030000000000000000";}}',
|
||||||
'as' => 'generated::Pg2kZhzUQX5UOGsb',
|
'as' => 'generated::qXNgDXoLuA95HjrL',
|
||||||
),
|
),
|
||||||
'fallback' => false,
|
'fallback' => false,
|
||||||
'defaults' =>
|
'defaults' =>
|
||||||
@@ -2698,7 +2772,7 @@ app('router')->setCompiledRoutes(
|
|||||||
$config,
|
$config,
|
||||||
$isProduction
|
$isProduction
|
||||||
))($request, $path);
|
))($request, $path);
|
||||||
}";s:5:"scope";s:47:"Illuminate\\Filesystem\\FilesystemServiceProvider";s:4:"this";N;s:4:"self";s:32:"0000000000000df20000000000000000";}}',
|
}";s:5:"scope";s:47:"Illuminate\\Filesystem\\FilesystemServiceProvider";s:4:"this";N;s:4:"self";s:32:"0000000000000df90000000000000000";}}',
|
||||||
'as' => 'storage.local',
|
'as' => 'storage.local',
|
||||||
),
|
),
|
||||||
'fallback' => false,
|
'fallback' => false,
|
||||||
|
|||||||
@@ -13,10 +13,12 @@ return new class extends Migration
|
|||||||
{
|
{
|
||||||
Schema::create('multilines', function (Blueprint $table) {
|
Schema::create('multilines', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
|
$table->integer('sport_id');
|
||||||
$table->integer('client_id')->default(0);
|
$table->integer('client_id')->default(0);
|
||||||
$table->integer('bettype_id')->default(0);
|
$table->integer('bettype_id')->default(0);
|
||||||
$table->integer('bookmaker_id')->default(0);
|
$table->integer('bookmaker_id')->default(0);
|
||||||
$table->integer('sort-order')->default(0);
|
$table->integer('matchpart_id')->default(0);
|
||||||
|
$table->integer('sort')->default(0);
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?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('matchparts', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('short');
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('color');
|
||||||
|
$table->boolean('is_active')->default(0);
|
||||||
|
$table->integer('soccer')->default(0);
|
||||||
|
$table->integer('icehockey')->default(0);
|
||||||
|
$table->integer('basketball')->default(0);
|
||||||
|
$table->integer('tennis')->default(0);
|
||||||
|
$table->integer('handball')->default(0);
|
||||||
|
$table->integer('rugby')->default(0);
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('matchparts');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class MatchpartSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Clients
|
||||||
|
*/
|
||||||
|
$sql = "INSERT INTO `matchparts` (`id`, `short`, `name`, `color`, `is_active`, `soccer`, `icehockey`, `basketball`, `tennis`, `handball`, `rugby`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
('1', 'FT', 'Fulltime', 'primary', '1', '1', '1', '1', '1', '1', '0', NULL, NULL),
|
||||||
|
('2', 'HT', 'Halftime', 'success', '1', '1', '0', '1', '0', '1', '0', NULL, NULL),
|
||||||
|
('3', 'H2', 'Second Half', 'warning', '1', '1', '0', '1', '0', '1', '0', NULL, NULL),
|
||||||
|
('4', 'CO', 'Combo', 'info', '1', '1', '1', '1', '0', '0', '0', NULL, NULL),
|
||||||
|
('5', 'Q1', 'Quarter 1', 'quarter', '1', '0', '0', '1', '0', '0', '0', NULL, NULL),
|
||||||
|
('6', 'Q2', 'Quarter 2', 'quarter', '0', '0', '0', '1', '0', '0', '0', NULL, NULL),
|
||||||
|
('7', 'Q3', 'Quarter 3', 'quarter', '0', '0', '0', '1', '0', '0', '0', NULL, NULL),
|
||||||
|
('8', 'Q4', 'Quarter 4', 'quarter', '0', '0', '0', '1', '0', '0', '0', NULL, NULL),
|
||||||
|
('9', 'P1', 'Period 1', 'period', '1', '0', '1', '0', '0', '0', '0', NULL, NULL),
|
||||||
|
('10', 'P2', 'Period 2', 'period', '0', '0', '1', '0', '0', '0', '0', NULL, NULL),
|
||||||
|
('11', 'P3', 'Period 3', 'period', '0', '0', '1', '0', '0', '0', '0', NULL, NULL),
|
||||||
|
('12', 'S1', 'Set 1', 'set', '1', '0', '0', '0', '1', '0', '0', NULL, NULL),
|
||||||
|
('13', 'S2', 'Set 2', 'set', '0', '0', '0', '0', '1', '0', '0', NULL, NULL),
|
||||||
|
('14', 'S3', 'Set 3', 'set', '0', '0', '0', '0', '1', '0', '0', NULL, NULL),
|
||||||
|
('15', 'S4', 'Set 4', 'set', '0', '0', '0', '0', '1', '0', '0', NULL, NULL),
|
||||||
|
('16', 'S5', 'Set 5', 'set', '0', '0', '0', '0', '1', '0', '0', NULL, NULL);
|
||||||
|
";
|
||||||
|
DB::unprepared($sql);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<div {{ $getExtraAttributeBag() }} class="h-4 w-16 bg-contain bg-center bg-no-repeat dark:opacity-85"
|
||||||
|
title="{{ $getState() }}"
|
||||||
|
style="background-image: url('{{ asset('storage/bookmaker-icons/' . $getState()) }}.png')">
|
||||||
|
</div>
|
||||||
@@ -1,25 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
use App\Utilities\BookmakerIcon;
|
use App\Utilities\BkmIconMap;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div {{ $getExtraAttributeBag() }}>
|
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-5 grid-rows-5 oddsbox">
|
||||||
|
|
||||||
{{-- {{ $record->odds_3way }} --}}
|
@foreach ($record->odds_3way as $row)
|
||||||
|
<div class="bg-contain bg-center bg-no-repeat dark:opacity-85" title="{{ $row->bookmaker->txid }}"
|
||||||
<div class="grid grid-cols-5 grid-rows-4 oddsbox">
|
style="background-image: url('{{ BkmIconMap::get($row->bookmaker) }}')">
|
||||||
|
</div>
|
||||||
@foreach ($record->odds_3way as $key => $row)
|
|
||||||
<div class="bl br bb bg-cover bg-center bg-no-repeat dark:opacity-85" title="{{ $row->bookmaker_id }}"
|
|
||||||
style="background-image: url('{{ BookmakerIcon::byId($row->bookmaker_id) }}')"></div>
|
|
||||||
<div class="br bb">{{ number_format($row->h3w, 2) }}</div>
|
<div class="br bb">{{ number_format($row->h3w, 2) }}</div>
|
||||||
<div class="br bb">{{ number_format($row->d3w, 2) }}</div>
|
<div class="br bb">{{ number_format($row->d3w, 2) }}</div>
|
||||||
<div class="br bb">{{ number_format($row->a3w, 2) }}</div>
|
<div class="br bb">{{ number_format($row->a3w, 2) }}</div>
|
||||||
<div class="br bb">{{ $row->margin }}</div>
|
<div class="br bb">{{ $row->margin }}</div>
|
||||||
|
|
||||||
@if ($key == 3)
|
|
||||||
@break;
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 279 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 204 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 31 KiB |