Skip to the content of this page

Advanced

Send your history

Your app probably existed before you installed Eloquentize. To fill your dashboard with its past, run:

php artisan eloquentize:models-count-legacy

It finds the oldest record of your models and counts every day from then until yesterday, using created_at. You get charts from the day your app launched.

Run it once per project, in a terminal.

Start from a given day

Pass a day as the first argument to start from there instead of from the oldest record:

php artisan eloquentize:models-count-legacy 01/01/2024

The options --event, --models, --modelsPath, --dateFormat, --scope and --scopeValue work like they do for models-count. See Commands and options.

To send the past of a property, use property-aggregate-legacy. Its arguments are the model, the property and the aggregation, then an optional day:

php artisan eloquentize:property-aggregate-legacy Bill amount sum

Count over all time

Some numbers are not about a day: the total number of customers, the total revenue. Use the overall commands:

php artisan eloquentize:model-count-overall User
php artisan eloquentize:property-aggregate-overall Bill amount sum

Both accept --modelsPath, --scope, --scopeValue and --dry.

About the author

© Eloquentize 2024–2026

Social & Contact

Bluesky LinkedIn