ComparingBookmakerMenu ok
This commit is contained in:
1 parent
be80128226
commit
f59ac10c2a
17 files changed
+272
-317
No files matched your search
@@ -7,7 +7,7 @@ use Illuminate\Support\Carbon;
|
||||
|
||||
class LoadProvider
|
||||
{
|
||||
public static function load($search_right)
|
||||
public static function load($search_right, $user)
|
||||
{
|
||||
if ($search_right) {
|
||||
|
||||
@@ -15,7 +15,8 @@ class LoadProvider
|
||||
|
||||
return Mapper::query()
|
||||
->where('starttime', '>', Carbon::now())
|
||||
->where('provider_id', auth()->user()->provider_id)
|
||||
->where('sport_id', $user->sport_id)
|
||||
->where('provider_id', $user->provider_id)
|
||||
->where(function ($query) use ($searchValues) {
|
||||
foreach ($searchValues as $value) {
|
||||
$query->orWhere('home', 'LIKE', '%'.$value.'%')
|
||||
@@ -25,7 +26,8 @@ class LoadProvider
|
||||
} else {
|
||||
return Mapper::query()
|
||||
->where('starttime', '>', Carbon::now())
|
||||
->where('provider_id', auth()->user()->provider_id);
|
||||
->where('sport_id', $user->sport_id)
|
||||
->where('provider_id', $user->provider_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user