MeilisearchQuery::for(User::class)->orWhere('name', 'Chris')
// "name = 'Chris'"
MeilisearchQuery::for(User::class)
->where('name', 'Bob')
->orWhere('name', 'Chris')
// "name = 'Bob' OR name = 'Chris'"
MeilisearchQuery::for(User::class)
->whereIn('name', ['Chris', 'Bob']);
// "name IN ['Chris','Bob']"
MeilisearchQuery::for(User::class)
->orWhereIn('name', ['Chris', 'Bob']);
// "name IN ['Chris','Bob']"
MeilisearchQuery::for(User::class)
->where('email', '[email protected]')
->orWhereIn('name', ['Chris', 'Bob']) ;
// "email = '[email protected]' OR name IN ['Chris','Bob']"
MeilisearchQuery::for(User::class)
->whereNotIn('name', ['Chris', 'Bob']);
// "name NOT IN ['Chris','Bob']"
MeilisearchQuery::for(User::class)
->where('email', '[email protected]')
->orWhereNotIn('name', ['Chris', 'Bob']);
// "email = '[email protected]' OR name NOT IN ['Chris','Bob']"
MeilisearchQuery::for(User::class)
->whereNot('name', 'Chris');
// "NOT name 'Chris'"
MeilisearchQuery::for(User::class)
->where('email', '[email protected]')
->orWhereNot('name', 'Chris');
// "email = '[email protected]' OR NOT name 'Chris'"
MeilisearchQuery::for(User::class)->whereIsEmpty('name');
// "name IS EMPTY"
MeilisearchQuery::for(User::class)
->whereNot('name', 'Chris')
->orWhereIsEmpty('name');
// "NOT name 'Chris' OR name IS EMPTY"
MeilisearchQuery::for(User::class)->whereTo('count', 1, 10);
// "count 1 TO 10"
MeilisearchQuery::for(User::class)
->where('email', '[email protected]')
->orWhereTo('count', 1, 10);
// "email = '[email protected]' OR count 1 TO 10"
MeilisearchQuery::for(User::class)
->whereRaw("name = 'Chris' OR name = 'Bob'")
->compile();
// "name = 'Chris' OR name = 'Bob'"
MeilisearchQuery::for(User::class)
->whereRaw("name = 'Chris'")
->orWhereRaw("name = 'Bob'")
->compile();
// "name = 'Chris' OR name = 'Bob'"
MeilisearchQuery::for(User::class)
->where(fn ($query) => $query
->whereNot('name', 'Chris')
->orWhereIsEmpty('name')
)
->orWhere('email', '[email protected]');
// "(NOT name 'Chris' OR name IS EMPTY) OR email = '[email protected]'"