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.
$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.