2
I’m having a question about how to do a customer search with multiple filters.
Example: nome cliente
, tipo de cliente
, status do cliente
, endereço
, cidade
.
Detail: all these filters are in different fields.
How to do this using the Eloquent of Laravel?
I’ve never worked with Laravel, but have you tried anything? If so, put the code of what you tried. You have already looked at the documentation http://laravel.com/docs/eloquent . And from what I looked at, if I understood it, it would be something like
$query->where('campo', $valor)->where('outroCampo', $outroValor)
– Marcelo Diniz
Place the tables or tables that make up this Model, including the Model class, please, this way imagining that you will not have any answer or until you have some that comes closer to your reality ...
– Maria
What do you mean "are in different fields"? do you want to make a query based on html form filters? If it is, I already have a quick answer :)
– Wallace Maxters