mercredi 12 février 2020

How to select only negative value from the table Laravel

How to select only negative value from the table using Laravel.

Model : BankDetail(bank_details)

----+----------+
|id |  amount  |
+---+----------+
| 1 |   -50    |
| 2 |   -70    |
| 3 |    73    |
| 4 |    80    |
| 5 |    60    |
| 6 |   -56    |
+---+----------+

I'm using the below query. Unfortunately, this one is not working.

BankDetail::where('amount','<',0)->get();


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/38lxeSn
via IFTTT

Aucun commentaire:

Enregistrer un commentaire