wip
This commit is contained in:
1 parent
965c7fca90
commit
d077b6a429
26 files changed
+134
-123
No files matched your search
@@ -18,14 +18,12 @@ class LoadProvider
|
||||
|
||||
if ($search_right) {
|
||||
|
||||
$searchValues = preg_split('/\s+/', $search_right, -1, PREG_SPLIT_NO_EMPTY);
|
||||
|
||||
return Mapper::query()
|
||||
->where('starttime', '>', Carbon::now())
|
||||
->where('sport_id', $user->sport_id)
|
||||
->where('provider_id', $user->provider_id)
|
||||
->where(function ($query) use ($searchValues) {
|
||||
foreach ($searchValues as $value) {
|
||||
->where(function ($query) use ($search_right) {
|
||||
foreach ($search_right as $value) {
|
||||
$query->orWhere('home', 'LIKE', '%'.$value.'%')
|
||||
->orWhere('away', 'LIKE', '%'.$value.'%');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user