rapideinternet/laravel-apm-events

There is no license information available for the latest version (v0.1.0) of this package.

Events Database for Laravel and ElasticSearch

v0.1.0 2018-11-30 14:04 UTC

This package is auto-updated.

Last update: 2024-12-08 06:53:19 UTC


README

Scalable Events Database for Laravel

This is a rewrite of Buonzz\Evorg

Requirements

  • PHP >= 7.0
  • ElasticSearch Servers

Installation

require in composer.json

"rapide/apm-events": "2.*"

update composer by executing this in your project base folder

composer update

publish the config settings

php artisan vendor:publish

edit config/apm-events.php

create the schemas in ElasticSearch

php artisan apm-events:create_schema

The application assumes that the Laravel Task scheduling cron entry is added in your crontab

* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1

Add the create indices to the scheduler

todo

Usage

Insert a click for a particular thumbnail

Route::get('click', function()
{
    return \Rapide\LaravelApmEvents\Facade::event("click")
                   ->insert('thumbnail', array(
                        'movie_name' => 'Interstellar',
                          'year' => '2014')
                );
});

Retrieve all click events

Route::get('all', function()
{
    return \Rapide\LaravelApmEvents\Facade::event("click")->get();
});