Skip to content

Commit

Permalink
Try extending the command?
Browse files Browse the repository at this point in the history
  • Loading branch information
r-kujawa committed Aug 18, 2023
1 parent c2586ec commit 64cb30f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/Console/Commands/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Payavel\Checkout\Console\Commands;

use Illuminate\Console\Command;
use Payavel\Serviceable\Console\Commands\Install as Command;
use Illuminate\Support\Facades\Artisan;

class Install extends Command
Expand All @@ -12,7 +12,8 @@ class Install extends Command
*
* @var string
*/
protected $signature = 'checkout:install';
protected $signature = 'checkout:install
{--id= : The service identifier}';

/**
* The console command description.
Expand All @@ -28,9 +29,8 @@ class Install extends Command
*/
public function handle()
{
Artisan::call('service:install', [
'service' => 'Checkout',
'--id' => 'checkout',
]);
$this->addArgument('service', 'checkout');

parent::handle();
}
}
11 changes: 4 additions & 7 deletions src/Console/Commands/MakeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Payavel\Checkout\Console\Commands;

use Illuminate\Console\Command;
use Payavel\Serviceable\Console\Commands\MakeProvider as Command;
use Illuminate\Support\Facades\Artisan;

class MakeProvider extends Command
Expand Down Expand Up @@ -31,11 +31,8 @@ class MakeProvider extends Command
*/
public function handle()
{
Artisan::call('service:provider', [
'provider' => $this->argument('provider'),
'--service' => 'checkout',
'--id' => $this->option('id'),
'--fake' => $this->option('fake', false),
]);
$this->addOption('service', 'checkout');

parent::handle();
}
}

0 comments on commit 64cb30f

Please sign in to comment.