2
How do I get the result of query
which will be executed in the database?
Example:
foreach ($prestadores as $prestador){
$achou = \DB::table('modulo_pr_espelho')
->where('prestador_id','=', $prestador->id)
->whereMonth('data_emissao',$mes)->get();
if (!isset($achou)) {
print "Prestador : " . $prestador->razao_social;
}
}
I need to know how the Eloquent
is riding this query
:
select modulo_pr_espelho.* where prestador_id = 1 where month(data_emissao) = 11
What method do I recover select
pure that was assembled by Eloquent
?
worked thanks!
– Marcelo Gomes
You’re welcome @Marcelogomes
– Miguel