comparatore bookmaker odds wip
This commit is contained in:
1 parent
adaec7b3dc
commit
218c1e6e1c
59 files changed
+470
-129
No files matched your search
@@ -6,6 +6,7 @@ use App\Filament\Resources\Events\Pages\ListEvents;
|
||||
use App\Filament\Resources\Events\Schemas\EventForm;
|
||||
use App\Filament\Resources\Events\Tables\EventsTable;
|
||||
use App\Models\Event;
|
||||
use App\Models\Multiline;
|
||||
use Carbon\Carbon;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
@@ -57,14 +58,24 @@ class EventResource extends Resource
|
||||
|
||||
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
|
||||
{
|
||||
// $_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()
|
||||
// ->join('odds_3ways', 'odds_3ways.event_id', '=', 'events.id')
|
||||
->where('starttime', '>', Carbon::now())
|
||||
->where('sport_id', auth()->user()->sport_id)
|
||||
->withoutGlobalScopes()->with('odds_3way');
|
||||
->where('sport_id', auth()->user()->sport_id);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user