Skip to content

Commit 43594a2

Browse files
authored
Merge pull request #80 from designvoid/master
PR to add the ability to configure the API host via the services config file
2 parents 141bf9b + 33ed93d commit 43594a2

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ MIXPANEL_TOKEN=xxxxxxxxxxxxxxxxxxxxxx
6060

6161
## Configuration
6262
### Default Values
63+
- `services.mixpanel.host`: (default: api.mixpanel.com) the api host to use.
6364
- `services.mixpanel.token`: pulls the 'MIXPANEL_TOKEN' value from your `.env`
6465
file.
6566
- `services.mixpanel.enable-default-tracking`: (default: true) enable or disable Laravel user

config/services.php

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
return [
44
'mixpanel' => [
5+
'host' => 'api.mixpanel.com',
56
'token' => env('MIXPANEL_TOKEN'),
67
'enable-default-tracking' => true,
78
'consumer' => 'socket',

src/LaravelMixpanel.php

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function __construct(Request $request, array $options = [])
1919
{
2020
$this->callbackResults = [];
2121
$this->defaults = [
22+
'host' => config('services.mixpanel.host', 'api.mixpanel.com'),
2223
'consumer' => config('services.mixpanel.consumer', 'socket'),
2324
'connect_timeout' => config('services.mixpanel.connect-timeout', 2),
2425
'timeout' => config('services.mixpanel.timeout', 2),

0 commit comments

Comments
 (0)