Good, basically what I want to generate is a query that returns a list of users, that have as excacto value the result of the difference of two fields.
In other words, I have the user table that has the fields ndias and diasconsumidos.
CURRENTLY I am doing the following
User::where('ndias','-','diasconsumidoss','=','5')->get();
but this does not work.
What I want you to do is basically the following. I leave the example of how the SQL query should be
SELECT * FROM 'users' WHERE (users.ndias - users.diasconsumidos) =5