How to use aggregate functions in Laravel?
Laravel provides a variety of aggregate functions such as max, min, count,avg, and sum. We can call any of these functions after constructing our query.
$users = DB::table(‘admin’)->count();
$maxComment = DB::table(‘blogs’)->max('comments');
BY Best Interview Question ON 06 May 2020