-
-
Save matheusdavidson/acbbdf7f16bb27bb1e62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Filter | |
if (!empty($filter)) { | |
$query->where('id', 'LIKE', "%{$filter}%"); | |
$query->orWhere('name', 'LIKE', "%{$filter}%"); | |
$query->orWhere('social_reason', 'LIKE', "%{$filter}%"); | |
$query->orWhere('state_insc', 'LIKE', "%{$filter}%"); | |
$query->orWhere('city_insc', 'LIKE', "%{$filter}%"); | |
$query->orWhere('cpf', 'LIKE', "%{$filter}%"); | |
$query->orWhere('cnpj', 'LIKE', "%{$filter}%"); | |
$query->orWhere('email', 'LIKE', "%{$filter}%"); | |
$query->orWhere('phone', 'LIKE', "%{$filter}%"); | |
$query->orWhere('mobile', 'LIKE', "%{$filter}%"); | |
$query->orWhere('address_cep', 'LIKE', "%{$filter}%"); | |
$query->orWhere('address_district', 'LIKE', "%{$filter}%"); | |
$query->orWhere('address_city', 'LIKE', "%{$filter}%"); | |
$query->orWhere('address_state', 'LIKE', "%{$filter}%"); | |
$query->orWhere('birth', 'LIKE', "%{$filter}%"); | |
$query->orWhere('gender', 'LIKE', "%{$filter}%"); | |
$query->orWhere('obs', 'LIKE', "%{$filter}%"); | |
$query->orWhere('type', 'LIKE', "%{$filter}%"); | |
$query->orWhere('contacts', 'LIKE', "%{$filter}%"); | |
} | |
// poderia ser no control: | |
Lib::setFilter(array(colunas,que,serão,filtradas)); | |
//na lib | |
setFilter = | |
foreach($column as $col=>val) | |
col like val | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment