comparatore bettypes wip
This commit is contained in:
1 parent
26bf5359bc
commit
28032520b4
28 files changed
+446
-149
No files matched your search
@@ -14,6 +14,8 @@ class MultilineGenerator
|
|||||||
|
|
||||||
MultilineClient::where('client_id', $client_id)->update(['disabled' => 1]);
|
MultilineClient::where('client_id', $client_id)->update(['disabled' => 1]);
|
||||||
|
|
||||||
|
$bookmaker = [0, 6, 30, 649, 117];
|
||||||
|
|
||||||
foreach ($record->sport as $sportid) {
|
foreach ($record->sport as $sportid) {
|
||||||
|
|
||||||
$multilines = MultilineSetting::where('sport_id', $sportid)->get();
|
$multilines = MultilineSetting::where('sport_id', $sportid)->get();
|
||||||
@@ -28,6 +30,7 @@ class MultilineGenerator
|
|||||||
'sport_id' => $sportid,
|
'sport_id' => $sportid,
|
||||||
'multiline_setting_id' => $multiline->id,
|
'multiline_setting_id' => $multiline->id,
|
||||||
'sort' => $i,
|
'sort' => $i,
|
||||||
|
'bookmaker_id' => $bookmaker[$i],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'disabled' => 0,
|
'disabled' => 0,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use App\Models\MultilineClient;
|
|||||||
|
|
||||||
class MultilineSlots
|
class MultilineSlots
|
||||||
{
|
{
|
||||||
public static function addSlots(&$data)
|
public static function loadSlots(&$data)
|
||||||
{
|
{
|
||||||
$slots = MultilineClient::select('bookmaker_id')
|
$slots = MultilineClient::select('bookmaker_id')
|
||||||
->where('multiline_setting_id', auth()->user()->multiline_setting_id)
|
->where('multiline_setting_id', auth()->user()->multiline_setting_id)
|
||||||
|
|||||||
@@ -181,9 +181,9 @@ class Odds
|
|||||||
|
|
||||||
foreach ($row->bookmaker as $book) {
|
foreach ($row->bookmaker as $book) {
|
||||||
|
|
||||||
|
NuhBash::$bookmaker_id = (int) $book['bid'];
|
||||||
|
|
||||||
$odds = [];
|
$odds = [];
|
||||||
$odds['event_id'] = NuhBash::$_event->id;
|
|
||||||
$odds['bookmaker_id'] = (int) $book['bid'];
|
|
||||||
$odds['sport_id'] = (int) $event['sport_id'];
|
$odds['sport_id'] = (int) $event['sport_id'];
|
||||||
$odds['provider_id'] = 2;
|
$odds['provider_id'] = 2;
|
||||||
|
|
||||||
@@ -240,7 +240,7 @@ class Odds
|
|||||||
|
|
||||||
EventBookmaker::updateOrCreate([
|
EventBookmaker::updateOrCreate([
|
||||||
'event_id' => NuhBash::$_event->id,
|
'event_id' => NuhBash::$_event->id,
|
||||||
'bookmaker_id' => $odds['bookmaker_id'],
|
'bookmaker_id' => NuhBash::$bookmaker_id,
|
||||||
], [
|
], [
|
||||||
'bmoid' => $value['bmoid'],
|
'bmoid' => $value['bmoid'],
|
||||||
'provider_id' => 2,
|
'provider_id' => 2,
|
||||||
@@ -252,7 +252,7 @@ class Odds
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note('END', 'g', 1);
|
Notice::note('END '.NuhBash::$_event->id, 'g');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,11 +12,10 @@ class _3Way
|
|||||||
{
|
{
|
||||||
public static function grap($odds, $offer)
|
public static function grap($odds, $offer)
|
||||||
{
|
{
|
||||||
|
|
||||||
$debug = NuhBash::$options['d'] ?? 0;
|
$debug = NuhBash::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note('1X2 '.$odds['bookmaker_id'], 'b');
|
Notice::note('1X2 '.NuhBash::$bookmaker_id, 'b');
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_array = [];
|
$update_array = [];
|
||||||
@@ -35,12 +34,17 @@ class _3Way
|
|||||||
];
|
];
|
||||||
|
|
||||||
$update_array['bmoid'] = $odds['bmoid'];
|
$update_array['bmoid'] = $odds['bmoid'];
|
||||||
|
$update_array['sport_id'] = $odds['sport_id'];
|
||||||
$update_array['offer_id'] = $odds['offer_id'];
|
$update_array['offer_id'] = $odds['offer_id'];
|
||||||
$update_array['flag'] = 1;
|
$update_array['flag'] = 1;
|
||||||
|
$update_array['provider_id'] = $odds['provider_id'];
|
||||||
$update_array['nuh_check'] = 0;
|
$update_array['nuh_check'] = 0;
|
||||||
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
||||||
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
||||||
|
|
||||||
Odds3way::updateOrCreate($odds, $update_array);
|
Odds3way::updateOrCreate([
|
||||||
|
'event_id' => NuhBash::$_event->id,
|
||||||
|
'bookmaker_id' => NuhBash::$bookmaker_id,
|
||||||
|
], $update_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ class _Dc
|
|||||||
$debug = NuhBash::$options['d'] ?? 0;
|
$debug = NuhBash::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note('Double Chance '.$odds['bookmaker_id'], 'b');
|
Notice::note('Double Chance '.NuhBash::$bookmaker_id, 'b');
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_array = [];
|
$update_array = [];
|
||||||
@@ -27,12 +27,17 @@ class _Dc
|
|||||||
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
|
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
|
||||||
|
|
||||||
$update_array['bmoid'] = $odds['bmoid'];
|
$update_array['bmoid'] = $odds['bmoid'];
|
||||||
|
$update_array['sport_id'] = $odds['sport_id'];
|
||||||
$update_array['offer_id'] = $odds['offer_id'];
|
$update_array['offer_id'] = $odds['offer_id'];
|
||||||
$update_array['flag'] = 1;
|
$update_array['flag'] = 1;
|
||||||
|
$update_array['provider_id'] = $odds['provider_id'];
|
||||||
$update_array['nuh_check'] = 0;
|
$update_array['nuh_check'] = 0;
|
||||||
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
||||||
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
||||||
|
|
||||||
OddsDc::updateOrCreate($odds, $update_array);
|
OddsDc::updateOrCreate([
|
||||||
|
'event_id' => NuhBash::$_event->id,
|
||||||
|
'bookmaker_id' => NuhBash::$bookmaker_id,
|
||||||
|
], $update_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ class _Dnb
|
|||||||
$debug = NuhBash::$options['d'] ?? 0;
|
$debug = NuhBash::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note('Draw No Bet '.$odds['bookmaker_id'], 'b');
|
Notice::note('Draw No Bet '.NuhBash::$bookmaker_id, 'b');
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_array = [];
|
$update_array = [];
|
||||||
@@ -26,12 +26,17 @@ class _Dnb
|
|||||||
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
|
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
|
||||||
|
|
||||||
$update_array['bmoid'] = $odds['bmoid'];
|
$update_array['bmoid'] = $odds['bmoid'];
|
||||||
|
$update_array['sport_id'] = $odds['sport_id'];
|
||||||
$update_array['offer_id'] = $odds['offer_id'];
|
$update_array['offer_id'] = $odds['offer_id'];
|
||||||
$update_array['flag'] = 1;
|
$update_array['flag'] = 1;
|
||||||
|
$update_array['provider_id'] = $odds['provider_id'];
|
||||||
$update_array['nuh_check'] = 0;
|
$update_array['nuh_check'] = 0;
|
||||||
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
||||||
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
||||||
|
|
||||||
OddsDnb::updateOrCreate($odds, $update_array);
|
OddsDnb::updateOrCreate([
|
||||||
|
'event_id' => NuhBash::$_event->id,
|
||||||
|
'bookmaker_id' => NuhBash::$bookmaker_id,
|
||||||
|
], $update_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ class _Ggng
|
|||||||
$debug = NuhBash::$options['d'] ?? 0;
|
$debug = NuhBash::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note('Goal No Goal '.$odds['bookmaker_id'], 'b');
|
Notice::note('Goal No Goal '.NuhBash::$bookmaker_id, 'b');
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_array = [];
|
$update_array = [];
|
||||||
@@ -26,12 +26,17 @@ class _Ggng
|
|||||||
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
|
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
|
||||||
|
|
||||||
$update_array['bmoid'] = $odds['bmoid'];
|
$update_array['bmoid'] = $odds['bmoid'];
|
||||||
|
$update_array['sport_id'] = $odds['sport_id'];
|
||||||
$update_array['offer_id'] = $odds['offer_id'];
|
$update_array['offer_id'] = $odds['offer_id'];
|
||||||
$update_array['flag'] = 1;
|
$update_array['flag'] = 1;
|
||||||
|
$update_array['provider_id'] = $odds['provider_id'];
|
||||||
$update_array['nuh_check'] = 0;
|
$update_array['nuh_check'] = 0;
|
||||||
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
||||||
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
||||||
|
|
||||||
OddsGgng::updateOrCreate($odds, $update_array);
|
OddsGgng::updateOrCreate([
|
||||||
|
'event_id' => NuhBash::$_event->id,
|
||||||
|
'bookmaker_id' => NuhBash::$bookmaker_id,
|
||||||
|
], $update_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ class _Totals
|
|||||||
$debug = NuhBash::$options['d'] ?? 0;
|
$debug = NuhBash::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note('Totals '.$odds['bookmaker_id'], 'b');
|
Notice::note('Totals '.NuhBash::$bookmaker_id, 'b');
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_array = [];
|
$update_array = [];
|
||||||
@@ -35,12 +35,17 @@ class _Totals
|
|||||||
$update_array['margin'] = (float) Margin::calculate([$update_array['over'], $update_array['under']], 1);
|
$update_array['margin'] = (float) Margin::calculate([$update_array['over'], $update_array['under']], 1);
|
||||||
|
|
||||||
$update_array['bmoid'] = $odds['bmoid'];
|
$update_array['bmoid'] = $odds['bmoid'];
|
||||||
|
$update_array['sport_id'] = $odds['sport_id'];
|
||||||
$update_array['offer_id'] = $odds['offer_id'];
|
$update_array['offer_id'] = $odds['offer_id'];
|
||||||
$update_array['flag'] = 1;
|
$update_array['flag'] = 1;
|
||||||
|
$update_array['provider_id'] = $odds['provider_id'];
|
||||||
$update_array['nuh_check'] = 0;
|
$update_array['nuh_check'] = 0;
|
||||||
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
||||||
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
||||||
|
|
||||||
OddsTotal::updateOrCreate($odds, $update_array);
|
OddsTotal::updateOrCreate([
|
||||||
|
'event_id' => NuhBash::$_event->id,
|
||||||
|
'bookmaker_id' => NuhBash::$bookmaker_id,
|
||||||
|
], $update_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ class _Tq
|
|||||||
$debug = NuhBash::$options['d'] ?? 0;
|
$debug = NuhBash::$options['d'] ?? 0;
|
||||||
|
|
||||||
if ($debug) {
|
if ($debug) {
|
||||||
Notice::note('To Qualify '.$odds['bookmaker_id'], 'b');
|
Notice::note('To Qualify '.NuhBash::$bookmaker_id, 'b');
|
||||||
}
|
}
|
||||||
|
|
||||||
$update_array = [];
|
$update_array = [];
|
||||||
@@ -26,12 +26,17 @@ class _Tq
|
|||||||
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
|
$update_array['margin'] = (float) Margin::calculate($update_array, 1);
|
||||||
|
|
||||||
$update_array['bmoid'] = $odds['bmoid'];
|
$update_array['bmoid'] = $odds['bmoid'];
|
||||||
|
$update_array['sport_id'] = $odds['sport_id'];
|
||||||
$update_array['offer_id'] = $odds['offer_id'];
|
$update_array['offer_id'] = $odds['offer_id'];
|
||||||
$update_array['flag'] = 1;
|
$update_array['flag'] = 1;
|
||||||
|
$update_array['provider_id'] = $odds['provider_id'];
|
||||||
$update_array['nuh_check'] = 0;
|
$update_array['nuh_check'] = 0;
|
||||||
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
$update_array['last_check_at'] = Carbon::now()->toDateTimeString();
|
||||||
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
$update_array['source_updated_at'] = $odds['source_updated_at'];
|
||||||
|
|
||||||
OddsQualify::updateOrCreate($odds, $update_array);
|
OddsQualify::updateOrCreate([
|
||||||
|
'event_id' => NuhBash::$_event->id,
|
||||||
|
'bookmaker_id' => NuhBash::$bookmaker_id,
|
||||||
|
], $update_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,6 +17,8 @@ class NuhBash extends Command
|
|||||||
|
|
||||||
public static $_event_bookmaker;
|
public static $_event_bookmaker;
|
||||||
|
|
||||||
|
public static $bookmaker_id;
|
||||||
|
|
||||||
public static $AUTHTOKEN;
|
public static $AUTHTOKEN;
|
||||||
|
|
||||||
public static $BETSAPI_TOKEN = '36152-aeTRNnZxSPUwGe';
|
public static $BETSAPI_TOKEN = '36152-aeTRNnZxSPUwGe';
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Resources\Events\Tables;
|
namespace App\Filament\Resources\Events\Tables;
|
||||||
|
|
||||||
use App\Filament\Tables\Columns\Odds3Way;
|
use App\Filament\Tables\Columns\MultilineClient;
|
||||||
use App\Filament\Tables\Columns\OddsTotals;
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Filament\Actions\DeleteAction;
|
use Filament\Actions\DeleteAction;
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
@@ -27,7 +26,8 @@ class EventsTable
|
|||||||
->size(IconSize::ExtraLarge)
|
->size(IconSize::ExtraLarge)
|
||||||
->icon(fn ($record) => $record->sport->icon)
|
->icon(fn ($record) => $record->sport->icon)
|
||||||
->tooltip(fn ($record) => $record->id),
|
->tooltip(fn ($record) => $record->id),
|
||||||
TextColumn::make('txodds_id')->label('Match Id')->badge()->copyable()->searchable(),
|
// TextColumn::make('id'),
|
||||||
|
TextColumn::make('txodds_id')->label('Id')->badge()->copyable()->searchable(),
|
||||||
TextColumn::make('starttime')
|
TextColumn::make('starttime')
|
||||||
->label('Start')
|
->label('Start')
|
||||||
->alignCenter()
|
->alignCenter()
|
||||||
@@ -42,8 +42,8 @@ class EventsTable
|
|||||||
TextColumn::make('home.name')->alignRight()->searchable(),
|
TextColumn::make('home.name')->alignRight()->searchable(),
|
||||||
TextColumn::make('away.name')->searchable(),
|
TextColumn::make('away.name')->searchable(),
|
||||||
|
|
||||||
Odds3Way::make('odds_3way.bookmaker')->label('1X2')->visible(auth()->user()->multiline_setting_id == 1),
|
MultilineClient::make('id')->label(fn ($record) => view('filament.tables.columns.multiline-labels')),
|
||||||
OddsTotals::make('odds_totals.bookmaker')->label('Totals')->visible(auth()->user()->multiline_setting_id == 6),
|
|
||||||
])
|
])
|
||||||
->defaultSort('starttime', 'ASC')
|
->defaultSort('starttime', 'ASC')
|
||||||
->deferFilters(false)
|
->deferFilters(false)
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Tables\Columns;
|
||||||
|
|
||||||
|
use App\Models\MultilineSetting;
|
||||||
|
use Filament\Tables\Columns\Column;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use stdClass;
|
||||||
|
|
||||||
|
class MultilineClient extends Column
|
||||||
|
{
|
||||||
|
protected string $view = 'filament.tables.columns.multiline-client';
|
||||||
|
|
||||||
|
protected ?array $slots;
|
||||||
|
|
||||||
|
protected ?array $settings;
|
||||||
|
|
||||||
|
public function loadSlots($event_id, $bookmakers)
|
||||||
|
{
|
||||||
|
$this->settings = MultilineSetting::where('id', auth()->user()->multiline_setting_id)->select('table', 'has_3_columns')->first()->toArray();
|
||||||
|
|
||||||
|
$odds = DB::table($this->settings['table'])->where('event_id', $event_id)->get();
|
||||||
|
|
||||||
|
$this->makeSlots($odds, $bookmakers);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function has3Columns(): ?int
|
||||||
|
{
|
||||||
|
return $this->settings['has_3_columns'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSlots(): ?array
|
||||||
|
{
|
||||||
|
return $this->slots;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function makeSlots(&$odds, $bookmakers)
|
||||||
|
{
|
||||||
|
|
||||||
|
$multilines = [];
|
||||||
|
|
||||||
|
foreach ($bookmakers as $slot => $bookmaker) {
|
||||||
|
|
||||||
|
$open = true;
|
||||||
|
|
||||||
|
foreach ($odds as $item) {
|
||||||
|
if ($item->bookmaker_id == $bookmaker->bookmaker_id) {
|
||||||
|
$item->icon = $bookmaker->bookmaker->icon;
|
||||||
|
$item->table = $this->settings['table'];
|
||||||
|
switch ($this->settings['table']) {
|
||||||
|
case 'odds_2ways':
|
||||||
|
case 'odds_2ways_s1':
|
||||||
|
$item->a = $item->h3w;
|
||||||
|
$item->c = $item->a3w;
|
||||||
|
break;
|
||||||
|
case 'odds_3ways':
|
||||||
|
$item->a = $item->h3w;
|
||||||
|
$item->b = $item->d3w;
|
||||||
|
$item->c = $item->a3w;
|
||||||
|
break;
|
||||||
|
case 'odds_dc':
|
||||||
|
$item->a = $item->dc1x;
|
||||||
|
$item->b = $item->dc12;
|
||||||
|
$item->c = $item->dc2x;
|
||||||
|
break;
|
||||||
|
case 'odds_dnb':
|
||||||
|
$item->a = $item->dnb1;
|
||||||
|
$item->c = $item->dnb2;
|
||||||
|
break;
|
||||||
|
case 'odds_ggng':
|
||||||
|
$item->a = $item->gg;
|
||||||
|
$item->c = $item->ng;
|
||||||
|
break;
|
||||||
|
case 'odds_handicaps':
|
||||||
|
case 'odds_handicaps_q1':
|
||||||
|
$item->a = $item->home;
|
||||||
|
$item->b = $item->away;
|
||||||
|
$item->c = $item->handicap;
|
||||||
|
break;
|
||||||
|
case 'odds_qualify':
|
||||||
|
$item->a = $item->htq;
|
||||||
|
$item->c = $item->atq;
|
||||||
|
break;
|
||||||
|
case 'odds_totals':
|
||||||
|
case 'odds_totals_q1':
|
||||||
|
$item->a = $item->over;
|
||||||
|
$item->b = $item->under;
|
||||||
|
$item->c = $item->total;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// code...
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$multilines[$slot] = $item;
|
||||||
|
$open = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($open) {
|
||||||
|
$item = new stdClass;
|
||||||
|
$item->bookmaker_id = $bookmaker->bookmaker_id;
|
||||||
|
$item->icon = $bookmaker->bookmaker->icon;
|
||||||
|
$item->a = 0;
|
||||||
|
$item->b = 0;
|
||||||
|
$item->c = 0;
|
||||||
|
$item->marging = 0;
|
||||||
|
$multilines[$slot] = $item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->slots = $multilines;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Filament\Tables\Columns;
|
|
||||||
|
|
||||||
use App\Actions\MultilineSlots;
|
|
||||||
use Filament\Tables\Columns\Column;
|
|
||||||
|
|
||||||
class Odds3Way extends Column
|
|
||||||
{
|
|
||||||
protected string $view = 'filament.tables.columns.odds3-way';
|
|
||||||
|
|
||||||
protected ?array $slots = [];
|
|
||||||
|
|
||||||
public function loadSlots(&$data)
|
|
||||||
{
|
|
||||||
$this->slots = MultilineSlots::addSlots($data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getSlots(): ?array
|
|
||||||
{
|
|
||||||
return $this->slots;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Filament\Tables\Columns;
|
|
||||||
|
|
||||||
use App\Actions\MultilineSlots;
|
|
||||||
use Filament\Tables\Columns\Column;
|
|
||||||
|
|
||||||
class OddsTotals extends Column
|
|
||||||
{
|
|
||||||
protected string $view = 'filament.tables.columns.odds-totals';
|
|
||||||
|
|
||||||
protected ?array $slots = [];
|
|
||||||
|
|
||||||
public function loadSlots(&$data)
|
|
||||||
{
|
|
||||||
$this->slots = MultilineSlots::addSlots($data);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getSlots(): ?array
|
|
||||||
{
|
|
||||||
return $this->slots;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -50,13 +50,8 @@ class Event extends Model
|
|||||||
return $this->hasOne(Element::class, 'txodds_id', 'away_id');
|
return $this->hasOne(Element::class, 'txodds_id', 'away_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function odds_3way()
|
public function multiline_client()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Odds3way::class, 'event_id', 'id')->with('bookmaker');
|
return $this->hasMany(MultilineClient::class, 'sport_id', 'sport_id')->with('bookmaker')->where('multiline_setting_id', auth()->user()->multiline_setting_id)->orderBy('sort');
|
||||||
}
|
|
||||||
|
|
||||||
public function odds_totals()
|
|
||||||
{
|
|
||||||
return $this->hasMany(OddsTotal::class, 'event_id', 'id')->with('bookmaker');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ class OddsTotal 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()
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ class Margin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$r = 0;
|
$r = 0;
|
||||||
foreach ($arr as $key => $value) {
|
foreach ($arr as $value) {
|
||||||
|
$value = $value < 1 ? 1 : $value;
|
||||||
$r += 100 / $value;
|
$r += 100 / $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ return new class extends Migration
|
|||||||
$table->string('short');
|
$table->string('short');
|
||||||
$table->string('table');
|
$table->string('table');
|
||||||
$table->integer('rows')->default(4);
|
$table->integer('rows')->default(4);
|
||||||
|
$table->integer('has_3_columns')->default(0);
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class BookmakerSeeder extends Seeder
|
|||||||
('15', 'TitanBet', 'titanbet', '15', '1000', '0', '0', '2', '0', '0', '0', '1', NULL, NULL),
|
('15', 'TitanBet', 'titanbet', '15', '1000', '0', '0', '2', '0', '0', '0', '1', NULL, NULL),
|
||||||
('16', 'DafaBet', 'dafabet', '16', '1000', '0', '0', '2', '0', '0', '0', '1', NULL, NULL),
|
('16', 'DafaBet', 'dafabet', '16', '1000', '0', '0', '2', '0', '0', '0', '1', NULL, NULL),
|
||||||
('17', 'BetVictor', 'betvictor', '17', '1000', '0', '0', '2', '0', '0', '0', '1', NULL, NULL),
|
('17', 'BetVictor', 'betvictor', '17', '1000', '0', '0', '2', '0', '0', '0', '1', NULL, NULL),
|
||||||
('18', '1XBet', '1xbet', '18', '1000', '0', '0', '2', '0', '0', '0', '0', NULL, NULL),
|
('18', '1XBet', '1xbet', '18', '649', '0', '0', '2', '0', '1', '2', '0', NULL, NULL),
|
||||||
('19', 'Expekt', 'expekt', '0', '5', '1', '1', '1', '0', '1', '0', '0', NULL, NULL),
|
('19', 'Expekt', 'expekt', '0', '5', '1', '1', '1', '0', '1', '0', '0', NULL, NULL),
|
||||||
('20', 'Magloo Nigeria', 'magloo-nig', '0', '10', '0', '0', '1', '0', '1', '0', '0', NULL, '2025-08-23 10:19:02'),
|
('20', 'Magloo Nigeria', 'magloo-nig', '0', '10', '0', '0', '1', '0', '1', '0', '0', NULL, '2025-08-23 10:19:02'),
|
||||||
('21', 'Sportingbet', 'sportingbet', '0', '13', '1', '1', '1', '0', '1', '0', '0', NULL, NULL),
|
('21', 'Sportingbet', 'sportingbet', '0', '13', '1', '1', '1', '0', '1', '0', '0', NULL, NULL),
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
SupervisorSeeder::class,
|
SupervisorSeeder::class,
|
||||||
BettypeSeeder::class,
|
BettypeSeeder::class,
|
||||||
MultilineSettingSeeder::class,
|
MultilineSettingSeeder::class,
|
||||||
|
MultilineClientsSeeder::class,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class MultilineClientsSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run(): void
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Multiline Slots
|
||||||
|
*/
|
||||||
|
$sql = "INSERT INTO `multiline_clients` (`id`, `client_id`, `sport_id`, `disabled`, `multiline_setting_id`, `bookmaker_id`, `sort`, `created_at`, `updated_at`)
|
||||||
|
VALUES
|
||||||
|
(1, 1, 1, 0, 1, 6, 1, '2025-12-17 02:59:52', '2025-12-17 03:00:01'),
|
||||||
|
(2, 1, 1, 0, 1, 30, 2, '2025-12-17 02:59:52', '2025-12-17 03:00:06'),
|
||||||
|
(3, 1, 1, 0, 1, 824, 3, '2025-12-17 02:59:52', '2025-12-17 03:09:25'),
|
||||||
|
(4, 1, 1, 0, 1, 117, 4, '2025-12-17 02:59:52', '2025-12-17 03:00:14'),
|
||||||
|
(5, 1, 1, 0, 2, 0, 1, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(6, 1, 1, 0, 2, 0, 2, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(7, 1, 1, 0, 2, 0, 3, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(8, 1, 1, 0, 2, 0, 4, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(9, 1, 1, 0, 3, 0, 1, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(10, 1, 1, 0, 3, 0, 2, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(11, 1, 1, 0, 3, 0, 3, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(12, 1, 1, 0, 3, 0, 4, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(13, 1, 1, 0, 4, 0, 1, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(14, 1, 1, 0, 4, 0, 2, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(15, 1, 1, 0, 4, 0, 3, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(16, 1, 1, 0, 4, 0, 4, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(17, 1, 1, 0, 5, 0, 1, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(18, 1, 1, 0, 5, 0, 2, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(19, 1, 1, 0, 5, 0, 3, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(20, 1, 1, 0, 5, 0, 4, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(21, 1, 1, 0, 6, 6, 1, '2025-12-17 02:59:52', '2025-12-17 03:04:38'),
|
||||||
|
(22, 1, 1, 0, 6, 30, 2, '2025-12-17 02:59:52', '2025-12-17 03:04:42'),
|
||||||
|
(23, 1, 1, 0, 6, 539, 3, '2025-12-17 02:59:52', '2025-12-17 03:04:47'),
|
||||||
|
(24, 1, 1, 0, 6, 658, 4, '2025-12-17 02:59:52', '2025-12-17 03:05:34'),
|
||||||
|
(25, 1, 3, 0, 7, 0, 1, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(26, 1, 3, 0, 7, 0, 2, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(27, 1, 3, 0, 7, 0, 3, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(28, 1, 3, 0, 7, 0, 4, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(29, 1, 3, 0, 8, 0, 1, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(30, 1, 3, 0, 8, 0, 2, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(31, 1, 3, 0, 8, 0, 3, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(32, 1, 3, 0, 8, 0, 4, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(33, 1, 3, 0, 9, 0, 1, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(34, 1, 3, 0, 9, 0, 2, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(35, 1, 3, 0, 9, 0, 3, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(36, 1, 3, 0, 9, 0, 4, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(37, 1, 3, 0, 10, 0, 1, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(38, 1, 3, 0, 10, 0, 2, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(39, 1, 3, 0, 10, 0, 3, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(40, 1, 3, 0, 10, 0, 4, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(41, 1, 3, 0, 11, 0, 1, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(42, 1, 3, 0, 11, 0, 2, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(43, 1, 3, 0, 11, 0, 3, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(44, 1, 3, 0, 11, 0, 4, '2025-12-17 02:59:52', '2025-12-17 02:59:52'),
|
||||||
|
(45, 2, 1, 0, 1, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(46, 2, 1, 0, 1, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(47, 2, 1, 0, 1, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(48, 2, 1, 0, 1, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(49, 2, 1, 0, 2, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(50, 2, 1, 0, 2, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(51, 2, 1, 0, 2, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(52, 2, 1, 0, 2, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(53, 2, 1, 0, 3, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(54, 2, 1, 0, 3, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(55, 2, 1, 0, 3, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(56, 2, 1, 0, 3, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(57, 2, 1, 0, 4, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(58, 2, 1, 0, 4, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(59, 2, 1, 0, 4, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(60, 2, 1, 0, 4, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(61, 2, 1, 0, 5, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(62, 2, 1, 0, 5, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(63, 2, 1, 0, 5, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(64, 2, 1, 0, 5, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(65, 2, 1, 0, 6, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(66, 2, 1, 0, 6, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(67, 2, 1, 0, 6, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(68, 2, 1, 0, 6, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(69, 2, 2, 0, 12, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(70, 2, 2, 0, 12, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(71, 2, 2, 0, 12, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(72, 2, 2, 0, 12, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(73, 2, 2, 0, 13, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(74, 2, 2, 0, 13, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(75, 2, 2, 0, 13, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(76, 2, 2, 0, 13, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(77, 2, 2, 0, 14, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(78, 2, 2, 0, 14, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(79, 2, 2, 0, 14, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(80, 2, 2, 0, 14, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(81, 2, 2, 0, 15, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(82, 2, 2, 0, 15, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(83, 2, 2, 0, 15, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(84, 2, 2, 0, 15, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(85, 2, 3, 0, 7, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(86, 2, 3, 0, 7, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(87, 2, 3, 0, 7, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(88, 2, 3, 0, 7, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(89, 2, 3, 0, 8, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(90, 2, 3, 0, 8, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(91, 2, 3, 0, 8, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(92, 2, 3, 0, 8, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(93, 2, 3, 0, 9, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(94, 2, 3, 0, 9, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(95, 2, 3, 0, 9, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(96, 2, 3, 0, 9, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(97, 2, 3, 0, 10, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(98, 2, 3, 0, 10, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(99, 2, 3, 0, 10, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(100, 2, 3, 0, 10, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(101, 2, 3, 0, 11, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(102, 2, 3, 0, 11, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(103, 2, 3, 0, 11, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(104, 2, 3, 0, 11, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(105, 2, 5, 0, 16, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(106, 2, 5, 0, 16, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(107, 2, 5, 0, 16, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(108, 2, 5, 0, 16, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(109, 2, 5, 0, 17, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(110, 2, 5, 0, 17, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(111, 2, 5, 0, 17, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(112, 2, 5, 0, 17, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(113, 2, 5, 0, 18, 0, 1, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(114, 2, 5, 0, 18, 0, 2, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(115, 2, 5, 0, 18, 0, 3, '2025-12-17 02:59:54', '2025-12-17 02:59:54'),
|
||||||
|
(116, 2, 5, 0, 18, 0, 4, '2025-12-17 02:59:54', '2025-12-17 02:59:54');
|
||||||
|
";
|
||||||
|
DB::unprepared($sql);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,26 +12,26 @@ class MultilineSettingSeeder extends Seeder
|
|||||||
/**
|
/**
|
||||||
* Clients
|
* Clients
|
||||||
*/
|
*/
|
||||||
$sql = "INSERT INTO `multiline_settings` (`id`, `sport_id`, `name`, `short`, `table`, `rows`, `created_at`, `updated_at`)
|
$sql = "INSERT INTO `multiline_settings` (`id`, `sport_id`, `name`, `short`, `table`, `rows`, `has_3_columns`, `created_at`, `updated_at`)
|
||||||
VALUES
|
VALUES
|
||||||
('1', '1', '1X2', '1X2', 'odds_3ways', '4', '2025-12-14 09:25:48', '2025-12-14 09:25:48'),
|
(1, 1, '1X2', '1X2', 'odds_3ways', 4, 1, '2025-12-14 09:25:48', '2025-12-14 09:25:48'),
|
||||||
('2', '1', 'DOUBLE CHANCE', 'DC', 'odds_dc', '4', '2025-12-14 09:31:22', '2025-12-14 09:32:55'),
|
(2, 1, 'DOUBLE CHANCE', 'DC', 'odds_dc', 4, 1, '2025-12-14 09:31:22', '2025-12-14 09:32:55'),
|
||||||
('3', '1', 'DRAW NO BET', 'DNB', 'odds_dnb', '4', '2025-12-14 09:31:42', '2025-12-14 09:31:42'),
|
(3, 1, 'DRAW NO BET', 'DNB', 'odds_dnb', 4, 0, '2025-12-14 09:31:42', '2025-12-14 09:31:42'),
|
||||||
('4', '1', 'GOAL NO GOAL', 'GGNG', 'odds_ggng', '4', '2025-12-14 09:31:56', '2025-12-14 09:31:56'),
|
(4, 1, 'GOAL NO GOAL', 'GGNG', 'odds_ggng', 4, 0, '2025-12-14 09:31:56', '2025-12-14 09:31:56'),
|
||||||
('5', '1', 'TO QUALIFY', 'TQ', 'odds_qualify', '4', '2025-12-14 09:32:19', '2025-12-14 09:32:19'),
|
(5, 1, 'TO QUALIFY', 'TQ', 'odds_qualify', 4, 0, '2025-12-14 09:32:19', '2025-12-14 09:32:19'),
|
||||||
('6', '1', 'TOTALS', 'OU', 'odds_totals', '4', '2025-12-14 09:32:38', '2025-12-14 09:32:38'),
|
(6, 1, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:32:38', '2025-12-14 09:32:38'),
|
||||||
('7', '3', 'MONEY LINE', 'ML', 'odds_2ways', '4', '2025-12-14 09:37:32', '2025-12-14 09:37:32'),
|
(7, 3, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:37:32', '2025-12-14 09:37:32'),
|
||||||
('8', '3', 'HANDICAP', 'HC', 'odds_handicaps', '4', '2025-12-14 09:38:05', '2025-12-14 09:38:05'),
|
(8, 3, 'HANDICAP', 'HC', 'odds_handicaps', 4, 1, '2025-12-14 09:38:05', '2025-12-14 09:38:05'),
|
||||||
('9', '3', 'HANDICAP FIRST QUARTER', 'HCQ1', 'odds_handicaps_q1', '4', '2025-12-14 09:38:26', '2025-12-14 09:39:54'),
|
(9, 3, 'HANDICAP FIRST QUARTER', 'HCQ1', 'odds_handicaps_q1', 4, 1, '2025-12-14 09:38:26', '2025-12-14 09:39:54'),
|
||||||
('10', '3', 'TOTALS', 'OU', 'odds_totals', '4', '2025-12-14 09:38:44', '2025-12-14 09:38:44'),
|
(10, 3, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:38:44', '2025-12-14 09:38:44'),
|
||||||
('11', '3', 'TOTALS FIRST QUARTER', 'OUQ1', 'odds_totals_q1', '4', '2025-12-14 09:39:12', '2025-12-14 09:39:59'),
|
(11, 3, 'TOTALS FIRST QUARTER', 'OUQ1', 'odds_totals_q1', 4, 1, '2025-12-14 09:39:12', '2025-12-14 09:39:59'),
|
||||||
('12', '2', 'MONEY LINE', 'ML', 'odds_2ways', '4', '2025-12-14 09:41:21', '2025-12-14 09:41:21'),
|
(12, 2, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:41:21', '2025-12-14 09:41:21'),
|
||||||
('13', '2', '1X2', '1X2', 'odds_3ways', '4', '2025-12-14 09:41:34', '2025-12-14 09:41:34'),
|
(13, 2, '1X2', '1X2', 'odds_3ways', 4, 1, '2025-12-14 09:41:34', '2025-12-14 09:41:34'),
|
||||||
('14', '2', 'HANDICAP', 'HC', 'odds_handicaps', '4', '2025-12-14 09:41:56', '2025-12-14 09:41:56'),
|
(14, 2, 'HANDICAP', 'HC', 'odds_handicaps', 4, 1, '2025-12-14 09:41:56', '2025-12-14 09:41:56'),
|
||||||
('15', '2', 'TOTALS', 'OU', 'odds_totals', '4', '2025-12-14 09:42:13', '2025-12-14 09:42:13'),
|
(15, 2, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:42:13', '2025-12-14 09:42:13'),
|
||||||
('16', '5', 'MONEY LINE', 'ML', 'odds_2ways', '4', '2025-12-14 09:43:52', '2025-12-14 09:43:52'),
|
(16, 5, 'MONEY LINE', 'ML', 'odds_2ways', 4, 0, '2025-12-14 09:43:52', '2025-12-14 09:43:52'),
|
||||||
('17', '5', 'MONEY LINE SET 1', 'MLS1', 'odds_2ways_s1', '4', '2025-12-14 09:44:13', '2025-12-14 09:44:13'),
|
(17, 5, 'MONEY LINE SET 1', 'MLS1', 'odds_2ways_s1', 4, 0, '2025-12-14 09:44:13', '2025-12-14 09:44:13'),
|
||||||
('18', '5', 'TOTALS', 'OU', 'odds_totals', '4', '2025-12-14 09:44:26', '2025-12-14 09:44:26');
|
(18, 5, 'TOTALS', 'OU', 'odds_totals', 4, 1, '2025-12-14 09:44:26', '2025-12-14 09:44:26');
|
||||||
";
|
";
|
||||||
DB::unprepared($sql);
|
DB::unprepared($sql);
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,11 @@ button[wire\:click="resetTableFiltersForm"] {
|
|||||||
border-top: 1px solid #e4e4e7;
|
border-top: 1px solid #e4e4e7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fi-ta-header-cell-id {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.oddsbox div {
|
.oddsbox div {
|
||||||
text-align: right;
|
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
padding: 0 1mm;
|
padding: 0 1mm;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
@@ -63,7 +66,6 @@ button[wire\:click="resetTableFiltersForm"] {
|
|||||||
|
|
||||||
|
|
||||||
.oddsbox div {
|
.oddsbox div {
|
||||||
text-align: right;
|
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
padding: 0 1mm;
|
padding: 0 1mm;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
@php
|
||||||
|
use App\Utilities\BkmIconMap;
|
||||||
|
use App\Utilities\OddsFormatting;
|
||||||
|
$loadSlots($getState(), $record->multiline_client);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if ($has3Columns())
|
||||||
|
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-5 grid-rows-5 oddsbox">
|
||||||
|
@else
|
||||||
|
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-4 grid-rows-5 oddsbox">
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@foreach ($getSlots() as $row)
|
||||||
|
<div class="bg-contain bg-center bg-no-repeat dark:opacity-90" title="{{ $row->bookmaker_id }}"
|
||||||
|
style="background-image: url('{{ BkmIconMap::get($row->icon) }}')">
|
||||||
|
</div>
|
||||||
|
<div class="br bb text-right">
|
||||||
|
|
||||||
|
@if (isset($row->a))
|
||||||
|
{{ OddsFormatting::get($row->a, 2) }}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@if ($has3Columns())
|
||||||
|
<div class="br bb text-right">
|
||||||
|
|
||||||
|
@if (isset($row->b))
|
||||||
|
{{ OddsFormatting::get($row->b, 2) }}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<div class="br bb text-right">
|
||||||
|
|
||||||
|
@if (isset($row->c))
|
||||||
|
{{ OddsFormatting::get($row->c, 2) }}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="br bb text-right">
|
||||||
|
|
||||||
|
@if (isset($row->margin))
|
||||||
|
{{ OddsFormatting::get($row->margin, 1) }}
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<div class="flex justify-start gap-0 oddsbox">
|
||||||
|
<div class="text-center"></div>
|
||||||
|
@switch(auth()->user()->multiline_setting_id)
|
||||||
|
@case(1)
|
||||||
|
@case(13)
|
||||||
|
<div class="text-center">1</div>
|
||||||
|
<div class="text-center">X</div>
|
||||||
|
<div class="text-center">2</div>
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case(7)
|
||||||
|
@case(12)
|
||||||
|
|
||||||
|
@case(16)
|
||||||
|
@case(17)
|
||||||
|
|
||||||
|
@case(8)
|
||||||
|
@case(14)
|
||||||
|
|
||||||
|
@case(9)
|
||||||
|
@case(5)
|
||||||
|
<div class="text-center">Home</div>
|
||||||
|
<div class="text-center">Away</div>
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case(2)
|
||||||
|
<div class="text-center">1X</div>
|
||||||
|
<div class="text-center">12</div>
|
||||||
|
<div class="text-center">2X</div>
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case(3)
|
||||||
|
<div class="text-center">DNB 1</div>
|
||||||
|
<div class="text-center">DNB 2</div>
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case(4)
|
||||||
|
<div class="text-center">Goal</div>
|
||||||
|
<div class="text-center">No Goal</div>
|
||||||
|
@break
|
||||||
|
|
||||||
|
@case(6)
|
||||||
|
@case(10)
|
||||||
|
|
||||||
|
@case(15)
|
||||||
|
@case(18)
|
||||||
|
|
||||||
|
@case(11)
|
||||||
|
<div class="text-center">O</div>
|
||||||
|
<div class="text-center">U</div>
|
||||||
|
<div class="text-center">Total</div>
|
||||||
|
@break
|
||||||
|
@endswitch
|
||||||
|
<div class="text-center"></div>
|
||||||
|
</div>
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
use App\Utilities\BkmIconMap;
|
|
||||||
use App\Utilities\OddsFormatting;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-5 grid-rows-5 oddsbox">
|
|
||||||
|
|
||||||
{{ $loadSlots($record->odds_totals) }}
|
|
||||||
|
|
||||||
@foreach ($getSlots() as $row)
|
|
||||||
@if (isset($row->bookmaker))
|
|
||||||
<div class="bg-contain bg-center bg-no-repeat dark:opacity-90" title="{{ $row->bookmaker->txid }}"
|
|
||||||
style="background-image: url('{{ BkmIconMap::get($row->bookmaker?->icon) }}')">
|
|
||||||
</div>
|
|
||||||
<div class="br bb">{{ OddsFormatting::get($row->over, 2) }} </div>
|
|
||||||
<div class="br bb">{{ OddsFormatting::get($row->under, 2) }} </div>
|
|
||||||
<div class="br bb">{{ OddsFormatting::get($row->total, 1) }} </div>
|
|
||||||
<div class="br bb">{{ OddsFormatting::get($row->margin, 1) }} </div>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
</div>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<?php
|
|
||||||
use App\Utilities\BkmIconMap;
|
|
||||||
use App\Utilities\OddsFormatting;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div {{ $getExtraAttributeBag() }} class="grid grid-cols-5 grid-rows-5 oddsbox">
|
|
||||||
|
|
||||||
{{ $loadSlots($record->odds_3way) }}
|
|
||||||
|
|
||||||
@foreach ($getSlots() as $row)
|
|
||||||
@if (isset($row->bookmaker))
|
|
||||||
<div class="bg-contain bg-center bg-no-repeat dark:opacity-90" title="{{ $row->bookmaker->txid }}"
|
|
||||||
style="background-image: url('{{ BkmIconMap::get($row->bookmaker?->icon) }}')">
|
|
||||||
</div>
|
|
||||||
<div class="br bb">{{ OddsFormatting::get($row->h3w, 2) }} </div>
|
|
||||||
<div class="br bb">{{ OddsFormatting::get($row->d3w, 2) }} </div>
|
|
||||||
<div class="br bb">{{ OddsFormatting::get($row->a3w, 2) }} </div>
|
|
||||||
<div class="br bb">{{ OddsFormatting::get($row->margin, 1) }} </div>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
</div>
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="flex justify-start w-full">
|
<div class="flex justify-center w-full">
|
||||||
<x-filament::input.wrapper prefix-icon="{{ $sporticon }}" prefix-icon-color="{{ $iconcolor }}">
|
<x-filament::input.wrapper prefix-icon="{{ $sporticon }}" prefix-icon-color="{{ $iconcolor }}">
|
||||||
<x-filament::input.select wire:model="sport_id" wire:change="swopSport">
|
<x-filament::input.select wire:model="sport_id" wire:change="swopSport">
|
||||||
@foreach ($sports as $id => $name)
|
@foreach ($sports as $id => $name)
|
||||||
@@ -7,16 +7,16 @@
|
|||||||
</x-filament::input.select>
|
</x-filament::input.select>
|
||||||
</x-filament::input.wrapper>
|
</x-filament::input.wrapper>
|
||||||
|
|
||||||
|
|
||||||
@foreach ($multilines as $multiline)
|
@foreach ($multilines as $multiline)
|
||||||
<div class="w-5"></div>
|
<div class="w-5"></div>
|
||||||
@if ($multiline['is_active'] == 1)
|
@if ($multiline['is_active'] == 1)
|
||||||
<x-filament::button>
|
<x-filament::button>
|
||||||
{{ $multiline['name'] }}
|
{{ $multiline['short'] }}
|
||||||
</x-filament::button>
|
</x-filament::button>
|
||||||
@else
|
@else
|
||||||
<x-filament::button outlined color="gray" wire:click="swopBettype({{ $multiline['id'] }})">
|
<x-filament::button outlined color="gray" tooltip="{{ $multiline['name'] }}"
|
||||||
{{ $multiline['name'] }}
|
wire:click="swopBettype({{ $multiline['id'] }})">
|
||||||
|
{{ $multiline['short'] }}
|
||||||
</x-filament::button>
|
</x-filament::button>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
Reference in new issue
Block a user