Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzhihai committed Dec 21, 2022
1 parent a29f8c9 commit 338eee7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"require": {
"php": "^7.4|^8.0",
"topthink/framework": "^6.0",
"geoip2/geoip2": "~2.1"
"geoip2/geoip2": "~2.1",
"ext-json": "*"
},
"require-dev": {
"monolog/monolog": "^2.8"
Expand Down
4 changes: 2 additions & 2 deletions src/console/Publish.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public function configure()
public function execute(Input $input, Output $output)
{
//获取默认配置文件
$path = root_path('resources');
$path = app( 'geoip' )->config( 'services.maxmind_database.database_path' );
if (is_file($path) === false) {
@mkdir($path, 0755, true);
copy(__DIR__ . '/../../resources/geoip.mmdb', $path.'/geoip.mmdb');
copy(__DIR__ . '/../../resources/geoip.mmdb', $path);
}
$output->writeln('publish ok');
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/IPApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function boot()
$base = [
'base_uri' => 'http://ip-api.com/',
'headers' => [
'User-Agent' => 'Laravel-GeoIP',
'User-Agent' => 'Think-GeoIP',
],
'query' => [
'fields' => 49663,
Expand Down

0 comments on commit 338eee7

Please sign in to comment.