Skip to content

Commit

Permalink
Merge vendor:publish command with installer
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidgh83 committed Aug 26, 2023
1 parent c9d07ca commit da35653
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@ composer require jetcod/ip-intelligence
This will fetch and install the necessary package files.

### Step 2: Configuration
IP-Intelligence requires configuration to work effectively. This library offers an artisan command tailored for Laravel projects, streamlining the installation and configuration of necessary databases. To initiate this process, first publish the vendor configuration file.

```bash
php artisan vendor:publish --tag=ip-intelligence-config
```

Then execute the artisan command:
IP-Intelligence requires configuration to work effectively. This library offers an artisan command tailored for Laravel projects, streamlining the installation and configuration of necessary databases. To kickstart this process, simply execute the following artisan command:

```bash
php artisan IpIntelligence:data-install
Expand Down
3 changes: 3 additions & 0 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Jetcod\IpIntelligence\Console;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
use Symfony\Component\Filesystem\Exception\FileNotFoundException;
Expand All @@ -26,6 +27,8 @@ class InstallCommand extends Command

public function handle(): void
{
Artisan::call('vendor:publish', ['--tag' => 'ip-intelligence-config']);

if ($this->SetGeolite2MmdbPath() && $this->InstallCldrData()) {
$this->line('');
$this->info('Setup completed successfully!');
Expand Down

0 comments on commit da35653

Please sign in to comment.