Skip to content

Commit

Permalink
Merge pull request #172 from jalmatari/patch-1
Browse files Browse the repository at this point in the history
Update MaxMindDatabase.php
  • Loading branch information
Torann committed Mar 9, 2020
2 parents 280b838 + 40ce6ee commit a6f00b8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Services/MaxMindDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ class MaxMindDatabase extends AbstractService
*/
public function boot()
{
$path = $this->config('database_path');
// Copy test database for now
if (file_exists($this->config('database_path')) === false) {
copy(__DIR__ . '/../../resources/geoip.mmdb', $this->config('database_path'));
if (file_exists($path) === false) {
mkdir(str_replace('/geoip.mmdb', '', $path));
copy(__DIR__ . '/../../resources/geoip.mmdb', $path);
}

$this->reader = new Reader(
$this->config('database_path'),
$this->config('locales', ['en'])
);
$this->reader = new Reader( $path, $this->config('locales', ['en']));
}

/**
Expand Down

0 comments on commit a6f00b8

Please sign in to comment.