Skip to content

Commit

Permalink
Merge pull request #80 from designvoid/master
Browse files Browse the repository at this point in the history
PR to add the ability to configure the API host via the services config file
  • Loading branch information
mikebronner authored Aug 5, 2020
2 parents 141bf9b + 33ed93d commit 43594a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ MIXPANEL_TOKEN=xxxxxxxxxxxxxxxxxxxxxx

## Configuration
### Default Values
- `services.mixpanel.host`: (default: api.mixpanel.com) the api host to use.
- `services.mixpanel.token`: pulls the 'MIXPANEL_TOKEN' value from your `.env`
file.
- `services.mixpanel.enable-default-tracking`: (default: true) enable or disable Laravel user
Expand Down
1 change: 1 addition & 0 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

return [
'mixpanel' => [
'host' => 'api.mixpanel.com',
'token' => env('MIXPANEL_TOKEN'),
'enable-default-tracking' => true,
'consumer' => 'socket',
Expand Down
1 change: 1 addition & 0 deletions src/LaravelMixpanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function __construct(Request $request, array $options = [])
{
$this->callbackResults = [];
$this->defaults = [
'host' => config('services.mixpanel.host', 'api.mixpanel.com'),
'consumer' => config('services.mixpanel.consumer', 'socket'),
'connect_timeout' => config('services.mixpanel.connect-timeout', 2),
'timeout' => config('services.mixpanel.timeout', 2),
Expand Down

0 comments on commit 43594a2

Please sign in to comment.