PHPackages                             jlorente/laravel-appsflyer - 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. [API Development](/categories/api)
4. /
5. jlorente/laravel-appsflyer

ActiveLibrary[API Development](/categories/api)

jlorente/laravel-appsflyer
==========================

Laravel 5.6 integration for the Jlorente Appsflyer package.

06.3k↓40%PHP

Since Sep 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jlorente/laravel-appsflyer)[ Packagist](https://packagist.org/packages/jlorente/laravel-appsflyer)[ RSS](/packages/jlorente-laravel-appsflyer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Appsflyer SDK for Laravel
=========================

[](#appsflyer-sdk-for-laravel)

This extension allows you to access the Appsflyer API by a comprehensive way.

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

With Composer installed, you can then install the extension using the following commands:

```
$ php composer.phar require jlorente/laravel-appsflyer
```

or add

```
...
    "require": {
        "jlorente/laravel-appsflyer": "*"
    }
```

to the `require` section of your `composer.json` file.

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

[](#configuration)

1. Register the ServiceProvider in your config/app.php service provider list.

config/app.php

```
return [
    //other stuff
    'providers' => [
        //other stuff
        \Jlorente\Laravel\Appsflyer\AppsflyerServiceProvider::class,
    ];
];
```

2. Add the following facade to the $aliases section.

config/app.php

```
return [
    //other stuff
    'aliases' => [
        //other stuff
        'Appsflyer' => \Jlorente\Laravel\Appsflyer\Facades\Appsflyer::class,
    ];
];
```

3. Set the dev\_key and api\_token in the config/services.php in a new created appsflyer array.

config/services.php

```
return [
    //other stuff
    'appsflyer' => [
        'dev_key' => 'YOUR_DEV_KEY',
        'api_token' => 'YOUR_API_TOKEN',
        'is_active' => true,
    ];
];
```

Usage
-----

[](#usage)

You can use the facade alias Appsflyer to execute api calls. The authentication params will be automaticaly injected.

```
Appsflyer::inappevent()->create($data);
```

Notification Channel
--------------------

[](#notification-channel)

A notification channel is included in this package and allows you to integrate the Appsflyer in app events service with the Laravel notifications.

### Formatting Notifications

[](#formatting-notifications)

If a notification should trigger an Appsflyer in app event, you should define a toAppsflyer method on the notification class. This method will receive a $notifiable entity and should return a Jlorente\\Laravel\\Appsflyer\\Notifications\\Messages\\AppsflyerMessage instance:

```
/**
 * Get the AppsflyerMessage that represents the notification.
 *
 * @param  mixed  $notifiable
 * @return \Jlorente\Laravel\Appsflyer\Notifications\Messages\AppsflyerMessage|string
 */
public function toAppsflyer($notifiable)
{
    return (new AppsflyerMessage)
                ->platform('com.mycompany.myapp')
                ->payload([
                    'eventName' => 'af_purchase'
                ]);
}
```

Once done, you must add the notification channel in the array of the via() method of the notification:

```
/**
 * Get the notification channels.
 *
 * @param  mixed  $notifiable
 * @return array|string
 */
public function via($notifiable)
{
    return [AppsflyerChannel::class];
}
```

You can find more info about Laravel notifications in [this page](https://laravel.com/docs/5.6/notifications).

License
-------

[](#license)

Copyright © 2018 José Lorente Martín .

Licensed under the BSD 3-Clause License. See LICENSE.txt for details.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5b6d568331349beaf1945db65a076cf60e6c124d504fcb43a21937f0c85bde3?d=identicon)[jlorente](/maintainers/jlorente)

---

Top Contributors

[![jlorente](https://avatars.githubusercontent.com/u/301741?v=4)](https://github.com/jlorente "jlorente (11 commits)")

### Embed Badge

![Health badge](/badges/jlorente-laravel-appsflyer/health.svg)

```
[![Health](https://phpackages.com/badges/jlorente-laravel-appsflyer/health.svg)](https://phpackages.com/packages/jlorente-laravel-appsflyer)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
