PHPackages                             jonnypickett/moesif-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. jonnypickett/moesif-laravel

Abandoned → [studio308/moesif-laravel](/?search=studio308%2Fmoesif-laravel)Library[Logging &amp; Monitoring](/categories/logging)

jonnypickett/moesif-laravel
===========================

Moesif SDK for Laravel 8.\*

0.2.2(3y ago)04094MITPHPPHP &gt;=7.3.0

Since Jul 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/studio308/moesif-laravel)[ Packagist](https://packagist.org/packages/jonnypickett/moesif-laravel)[ RSS](/packages/jonnypickett-moesif-laravel/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (5)Versions (12)Used By (0)

Moesif Laravel
==============

[](#moesif-laravel)

[![Built For Laravel](https://camo.githubusercontent.com/5dc33dc453936987e8423b2e93ebdb1955ecc7187cc664824ca4a957aecb85c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c74253230666f722d6c61726176656c2d626c75652e737667)](http://laravel.com)[![Latest Version on Packagist](https://camo.githubusercontent.com/54a116437dcd16a3581c2b4713db94ece375c2da318f5ef9f3494373d98d0f2d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73747564696f3330382f6d6f657369662d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/studio308/moesif-laravel)[![Total Downloads](https://camo.githubusercontent.com/74ade24aec64de96bf926440599cb0c1d5aca5936e69c102cfdb0ce89ad35160/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73747564696f3330382f6d6f657369662d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/studio308/moesif-laravel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Moesif SDK for Laravel 8.\*

- [Compatibility](#compatibility)
- [Installation](#installation)
- [Configuration](#configuration)

Compatibility
-------------

[](#compatibility)

Currently only compatible with Laravel 8.\*

Installation
------------

[](#installation)

Via Composer

```
$ composer require studio308/moesif-laravel
```

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Configuration
-------------

[](#configuration)

You will need to provide your Moesif Application ID in order to get this working.

You can find your Application ID from the [*Moesif Dashboard*](https://www.moesif.com/) -&gt; *Top Right Menu* -&gt; *Installation*

If you don't need to change any other config values, you can get away with just setting the appropriate env variable. The necessary env variable for the Application ID is:

```
MOESIF_APPLICATION_ID
```

The other env variable that you can set is:

```
MOESIF_DEBUG
```

Some sensible defaults are set for you in the config file, but if you need to modify it, you can modify it to fit your needs after publishing it with the command below.

```
php artisan vendor:publish
```

(DO NOT PUT YOUR APPLICATION ID IN THE CONFIG FILE. USE THE ENV VARIABLE.)

Usage
-----

[](#usage)

Add the `moesif` middleware to the `api` middleware group in your `Http/Kernel`

```
    /**
     * The application's route middleware groups.
     *
     * @var array
     */
    protected $middlewareGroups = [
        'web' => [
            ...
        ],

        'api' => [
            ...
            'moesif',
            ...
        ],
    ];
```

Configuration Documentation
---------------------------

[](#configuration-documentation)

Below is an example `config/moesif.php` configuration file.

```
