hydrarulz/laravel-mixpanel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hydrarulz/laravel-mixpanel

Composer 安装命令:

composer require hydrarulz/laravel-mixpanel

包简介

Bundle mixpanel for Laravel 5

README 文档

README

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:

'Hydrarulz\LaravelMixpanel\LaravelMixpanelServiceProvider',

The service provider will register an interface, but you should also register the alias at the end of the aliases array:

'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:

<?php

return [
    'token' => 'YOUR TOKEN HERE'
];

Replace with your Mixpanel token.

After this you can start using it in your application

$mixpanel = LaravelMixpanel::getInstance();
$mixpanel->people->set(
    $user->mixpanel_id
    , [
        'name' => 'Daniel Luca'
    ]
);
$mixpanel->track(
	'Event'
    , [
        'Type' => 'Click'
    ]
);

统计信息

  • 总下载量: 358
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-24