eloquentize/laravel-eloquentize-client

laravel library for eloquentize.com service

v1.0.1 2024-03-15 09:08 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.

68747470733a2f2f656c6f7175656e74697a652e636f6d2f696d616765732f656c6f7175656e74697a652d6c6f676f2d74722e737667

Getting started

Installation

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"

Usage

Requirements

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.

Installation

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

Docs

The full doc can be found Eloquentize.

Testing

pest

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.