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.
$ composer require fuzz/felk-php
- Add the service provider to
config/app.php
'providers' => [ ... /* * Application Service Providers... */ \Fuzz\Felk\Providers\FelkServiceProvider::class, ... ],
- Publish the vendor config
$ php artisan vendor:publish --provider="Fuzz\Felk\Providers\FelkServiceProvider"
- Configure the configuration variables in
config/felk.php
- 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, ... ];
- Check ElasticSearch.