Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elasticorange/laravelmixpanel
Mixpanel package interface for Laravel 5
https://github.com/elasticorange/laravelmixpanel
Last synced: 16 days ago
JSON representation
Mixpanel package interface for Laravel 5
- Host: GitHub
- URL: https://github.com/elasticorange/laravelmixpanel
- Owner: ElasticOrange
- License: mit
- Created: 2015-04-24T11:05:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-15T20:26:07.000Z (over 9 years ago)
- Last Synced: 2024-12-09T02:07:24.174Z (16 days ago)
- Language: PHP
- Homepage:
- Size: 145 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
laravel-mixpanel
================Install it with
```
composer require "hydrarulz/laravel-mixpanel:dev-master"
```Add the service provider at the end of the `providers` array in file `config/app.php`:
```php
'Hydrarulz\LaravelMixpanel\LaravelMixpanelServiceProvider',
```The service provider will register an interface, but you should also register the alias at the end of the `aliases` array:
```php
'LaravelMixpanel' => 'Hydrarulz\LaravelMixpanel\Facades\LaravelMixpanel',
```Then the you should publish the config file with
`php artisan vendor:publish`
This creates your config file `/config/laravel-mixpanel.php` that looks like this:'YOUR TOKEN HERE'
];Replace with your Mixpanel token.
After this you can start using it in your application
```php
$mixpanel = LaravelMixpanel::getInstance();
$mixpanel->people->set(
$user->mixpanel_id
, [
'name' => 'Daniel Luca'
]
);
$mixpanel->track(
'Event'
, [
'Type' => 'Click'
]
);
```