A
A
Alex Terechenko2020-07-12 14:17:55
Laravel
Alex Terechenko, 2020-07-12 14:17:55

How to get only those fields from DB where value is greater than 0 Laravel?

How to select data in which the value is greater than 0, so that each time you do not write Where something > 0
there can be a bunch of such records, please help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2020-07-12
@alextereeh8998

https://laravel.com/docs/7.x/eloquent#query-scopes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question