-4
How do I put this query in Eloquent?
SELECT juros FROM tbl_parcelas WHERE 2500 BETWEEN tbl_parcelas.valor_min AND tbl_parcelas.valor_max
CODE:
DB::table('SELECT juros FROM tbl_parcelas WHERE 2500 BETWEEN tbl_parcelas.valor_min AND tbl_parcelas.valor_max');
Hello André, what have you tried so far? You are having difficulty in some specific part of the query?
– gmsantos
I don’t know exactly how to use Eloquent syntax for this query
– André Cabral
Solution: DB::select("SELECT INTEREST FROM parcels WHERE $value BETWEEN valor_min AND valor_max");
– André Cabral