Eloquentize provides a full-featured monitoring toolkit for Laravel applications, designed for effortless integration. By incorporating a straightforward library, leveraging a smooth API, and offering a tailor-made dashboard, it simplifies the visualization of daily project metrics. This solution facilitates the efficient tracking and aggregation of model event metrics, streamlining project management and enriching insights, all without the need for extra coding.
You can install the package via composer:
composer require eloquentize/laravel-eloquentize-client
You can publish the config file with:
php artisan vendor:publish --tag="laravel-eloquentize-client-config"
To get started, you'll require a Laravel project, regardless of its version; even older versions like 5.6 running on PHP 7.4 are compatible, although such setups are less common now. However, Eloquentize is designed to work seamlessly even on these versions.
Shell access is beneficial but not essential, thanks to Laravel's scheduler. Therefore, ensuring a cron job is set up on your server is necessary. If you're using Laravel Forge, simply enable the Laravel scheduler option.
Lastly, your database tables must include timestamps for Eloquentize to function correctly.
To set up Eloquentize, start by installing it through Composer with the following command:
composer require eloquentize/laravel-eloquentize-client
for php 7.4 please use
composer require eloquentize/laravel-eloquentize-client dev-php7.4
After installation, proceed to eloquentize to create your account and generate an API key. This key should then be added to your .env
file in the following manner to complete the configuration process:
ELOQUENTIZE_API_TOKEN=your_api_key_here
Usage involves executing artisan commands like the one below to gather daily metrics: ( use --dry and -v for your test )
php artisan eloquentize:models-count --dry -v
You can tailor the data collection to your needs by specifying dates, event types, or selecting specific models, with aggregation commands available for deeper insights. These commands can be automated by scheduling them within App\Console\Kernel
.
For those with existing projects, historical data analysis from the project's inception is facilitated through:
php artisan eloquentize:models-count-legacy
The full doc can be found Eloquentize.
pest
Please see CHANGELOG for more information on what has changed recently.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.