fuzz/felk-php

0.3.12 2018-05-03 17:14 UTC

README

FELK is a helper library which can take data from a Laravel request/response and push it to a store (currently ElasticSearch, hence Fuzz ELK). It is intended to only be used in development environments to debug and run analytics on API requests/responses.

Installation

$ composer require fuzz/felk-php

Configuration

  1. Add the service provider to config/app.php
    'providers' => [
        ...
        
        /*
         * Application Service Providers...
         */
        \Fuzz\Felk\Providers\FelkServiceProvider::class,
        
        ...
    ],
  2. Publish the vendor config $ php artisan vendor:publish --provider="Fuzz\Felk\Providers\FelkServiceProvider"
  3. Configure the configuration variables in config/felk.php
  4. Add the Felk middleware to the middleware stack in app/Http/Kernel.php
    /**
     * The application's global HTTP middleware stack.
     *
     * These middleware are run during every request to your application.
     *
     * @var array
     */
    protected $middleware = [
        ...
        \Fuzz\Felk\Middleware\FelkMiddleware::class,
        ...
    ];
  5. Check ElasticSearch.