Databases

How To Get Total Result Count in Laravel Eloquent — step-by-step Programming tutorial on Progressive Robot

How To Get Total Result Count in Laravel Eloquent

When working with database query results, it is often useful to obtain only the total number of rows in a result set, instead of pulling the full dataset content with a regular query. Eloquent offers a few different aggregate methods that return a scalar value instead of an Eloquent object, such as count(), max(), and sum(). In this part of the series, you’ll update the main application view to show the total number of links in each list, using the count() method.

Read more
CHAT