Reputation: 5416
App\Employee::max('salary');
does not give max value if salary is greater than 99,999. Salary column type is string because salary column can contain salary amount or a text info.
What I can do to solve this issue ?
Thanks.
Upvotes: 1
Views: 810
Reputation: 515
I might be wrong, but max
SQL function can work only with numeric types. Try to switch from VARCHAR
to FLOAT
.
Upvotes: 1