YouTube Icon

Code Playground.

How to use Aggregate methods in Laravel 5

CFG

How to use Aggregate methods in Laravel 5

A number of aggregate methods such as count, cap, min, avg, and total are also given by the query builder. Upon constructing your application, you can name any of these methods.

The aggregate method is a system in which several row values are grouped together as inputs on certain parameters to form a single value of greater meaning or measurements such as a package, a bag or a list.

Count method

$count = DB::table('tbl_add_post')->count();




CFG