spatie / laravel-query-builder

Easily build Eloquent queries from API requests

Home Page:https://spatie.be/docs/laravel-query-builder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filter not in

elvispdosreis opened this issue · comments

I need to do a select using not in

/api/servico?filter[tag]=unifamiliar,multifamiliar,galpao_industria,comercial_sala,loteamento

servicos.tag not in

select
  *
from
  servicos
where
  servicos.tag in (
    'unifamiliar',
    'multifamiliar',
    'galpao_industria',
    'comercial_sala',
    'loteamento'
  )

Is there any way for me to deny the field type /api/servico?filter[!tag]=unifamiliar,multifamiliar or /api/servico?filter[tag]=!unifamiliar,!multifamiliar