wip
This commit is contained in:
1 parent
64f9c6865d
commit
0c1c4a63cd
2 files changed
+6
-6
No files matched your search
@@ -8,7 +8,7 @@ use Illuminate\Support\Carbon;
|
||||
|
||||
class LoadProvider
|
||||
{
|
||||
public static function load($search_values, $user)
|
||||
public static function load($search_values)
|
||||
{
|
||||
|
||||
$res = Event::query()->where('betradar_id', '>', 0)->pluck('betradar_id');
|
||||
@@ -20,8 +20,8 @@ class LoadProvider
|
||||
|
||||
return Mapper::query()
|
||||
->whereDate('starttime', '>', Carbon::now())
|
||||
->where('sport_id', $user->sport_id)
|
||||
->where('provider_id', $user->provider_id)
|
||||
->where('sport_id', auth()->user()->sport_id)
|
||||
->where('provider_id', auth()->user()->provider_id)
|
||||
->where(function ($query) use ($search_values) {
|
||||
foreach ($search_values as $value) {
|
||||
$query->orWhere('home', 'LIKE', '%'.$value.'%')
|
||||
@@ -32,8 +32,8 @@ class LoadProvider
|
||||
} else {
|
||||
return Mapper::query()
|
||||
->whereDate('starttime', '>', Carbon::now())
|
||||
->where('sport_id', $user->sport_id)
|
||||
->where('provider_id', $user->provider_id);
|
||||
->where('sport_id', auth()->user()->sport_id)
|
||||
->where('provider_id', auth()->user()->provider_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class MapperRight extends Component implements HasActions, HasSchemas, HasTable
|
||||
public function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->query(LoadProvider::load($this->search_values, auth()->user()))
|
||||
->query(LoadProvider::load($this->search_values))
|
||||
->striped()
|
||||
->columns([
|
||||
MapperRightColumn::make('left')->label('Event')->alignCenter(),
|
||||
|
||||
Reference in new issue
Block a user