Skip to content

Commit

Permalink
set custom iphandler from config
Browse files Browse the repository at this point in the history
  • Loading branch information
Soban Mahmod committed Jul 5, 2022
1 parent 3888c34 commit 4288457
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ipinfolaravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ public function configure()
$this->settings['cache'] = new DefaultCache($maxsize, $ttl);
}

if ($custom_iphandler = config('services.ipinfo.iphandler', null)) {
$this->settings['iphandler'] = $custom_iphandler;
} else {
// TODO: Handle this case, with default options
}

$this->ipinfo = new IPinfoClient($this->access_token, $this->settings);
}

Expand Down

0 comments on commit 4288457

Please sign in to comment.