Thursday, 23 July 2015

In this example, I have a user's table & I want to get the user who have maximum and minimum amount. For that I used the following code.

How to fetch maximum and minimum value of a column in laravel
 
 
$price = DB::table('users')->max('amount');
$price = DB::table('users')->min('amount');
 
- For complete Blog, Visit FindNerd Forum Link: How to fetch maximum and minimum value of a column in laravel .

FindNerd is the right place to resolve PHP language problems. Here you can post PHP Questions and Answers.

If you need PHP language, visit to FindNerd’sPHP Blog.

No comments:

Post a Comment