Download the PHP package frnkly/laravel-keen without Composer

On this page you can find all versions of the php package frnkly/laravel-keen. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-keen

Laravel + Keen.io

Defer sending event data to Keen.io until after a request has been fulfilled–automatically and transparently.

Latest Stable Version Build Status Total Downloads License

This package provides a light wrapper around the Keen PHP client, as well as a middleware configured to defer sending event data to Keen until after each request has been fulfilled. That means that as the number of tracked events increase, the impact on request time remains virtually non-existent. For convenience, the middleware can also track every request automatically.

Features

Installation

Install the Laravel + Keen package using Composer:

$ composer require frnkly/laravel-keen

This will also install the Keen PHP client as a dependency.

Configuration

Your Keen project ID and keys should be defined in the config/services.php configuration file, but will usually come from the environment configuration:

And in your .env file, you might add something like:

Getting started

Register the middleware globally in app/Http/Kernel.php:

Or within a middleware group:

Thanks to package discovery in Laravel 5.5, the service provider should already be available. It can also be manually registered through the config/app.php configuration file:

Automatic tracking of every request

Automatic tracking is enabled by default. You may disable this behaviour through the configuration file:

Data enrichment

To automatically add data enrichment to each request, use the following configuration options:

Each data enrichment object will appear in your Keen stream under the same name as above (i.e. ip_to_geo and ua_parser).

Using your own middleware

The included middleware makes it simple to extend and gain more granular control over the data that gets sent to Keen. You can create your own middleware using Artisan, and then have it extend \Frnkly\LaravelKeen\Middleware:

$ php artisan make:middleware TracksRequests

Inside the new middleware, override the protected method buildRequestEventData:

Remember to update your app/Http/Kernel.php file to use your own middleware class instead of the pre-configured one.

Skipping requests

Some response codes do not need to be tracked, such as redirects. You can configure a list of response codes to ignore in your middleware:

You may also override the shouldRun method in the middleware:

Type-hinting

The LaravelKeen client can be type-hinted in the constructor of any class that is resolved by the container:

Controllers can also take advantage of method injection:


This project is licensed under the MIT license.

I'd love to hear your comments or questions about this project. If you have an idea on how to improve it, create an issue or get in touch.


All versions of laravel-keen with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
keen-io/keen-io Version ~2.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package frnkly/laravel-keen contains the following files

Loading the files please wait ....