public function register() { $this->app->singleton('Nebo15\\LumenMixpanel\\Mixpanel', function (Application $app) { $token = env('MIXPANEL_TOKEN', false); if (!$token) { throw new LumenMixpanelException('set intercom keys for LumenIntercom'); } return Mixpanel::getInstance($token); }); }
/** * Instantiates a new Mixpanel instance. * @param $token * @param array $options */ public function __construct($token, $options = []) { parent::__construct($token, $options); }