V
Size: a a a
V
Gt
J
Gt
J
V
V
AS
$partip_arr = explode(" ",mb_strtolower($request->keywords));
$events = Event::where(function($q) use ($partip_arr) {
$q->where('name', 'like', '%' . $partip_arr . '%');
foreach ($partip_arr as $index => $value) {
if ($index === 0) {
continue;
}
$q->orWhere('name', 'like', '%' . $value . '%');
$q->orWhere('description', 'like', '%' . $value . '%');
}
})
->orWhere(function ($q) use ($partip_arr) {
$q->where('participants', '@>', json_encode($partip_arr[0]));
foreach ($partip_arr as $index => $value) {
if ($index === 0) {
continue;
}
$q->orWhere('participants', '@>', json_encode($value));
}
})
->offset(request('offset'))
->take(20)
->latest()->get();
AS
Gt
J
V
ДК
V
AS
Gt
AS
Gt
AS
J