Skip to content

Commit

Permalink
feat: added config:clear command in the installation process.
Browse files Browse the repository at this point in the history
  • Loading branch information
victore13 committed Sep 27, 2024
1 parent 38ae96d commit a64c2cf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Commands/OAuthCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Raiolanetworks\OAuth\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Str;

use function Laravel\Prompts\info;
Expand All @@ -19,18 +20,19 @@ class OAuthCommand extends Command

public function handle(): int
{
$this->setConfigVariables();
info('3 variables have been overwritten in the configuration file “oauth.php”.');

$this->setEnvironmentVariables();
info('6 new variables have been created in the environment file “.env”.');

$this->call('vendor:publish', [
'--tag' => 'oauth-config',
'--force',
]);
info('The configuration file has been published.');

$this->setConfigVariables();
$this->call('config:clear');
info('Some variables have been overwritten in the configuration file “oauth.php”.');

$this->setEnvironmentVariables();
info('Some new variables have been created in the environment file “.env”.');

info('Loading migrations...');
app()->make('oauth')->loadMigrations();

Expand Down

0 comments on commit a64c2cf

Please sign in to comment.