Repo rebuild
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Countries\Console;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class SyncIsoCountriesCommand extends Command
|
||||
{
|
||||
/** @var string */
|
||||
protected $signature = 'countries:sync-iso {--subdivisions : Also seed bundled ISO 3166-2 subdivision data}';
|
||||
|
||||
/** @var string */
|
||||
protected $description = 'Synchronise bundled ISO 3166 country reference data.';
|
||||
|
||||
/**
|
||||
* Execute the command.
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
$this->call('db:seed', [
|
||||
'--class' => 'Modules\\Countries\\Database\\Seeders\\IsoCountriesSeeder',
|
||||
'--force' => true,
|
||||
]);
|
||||
|
||||
if ($this->option('subdivisions')) {
|
||||
$this->call('db:seed', [
|
||||
'--class' => 'Modules\\Countries\\Database\\Seeders\\IsoCountrySubdivisionsSeeder',
|
||||
'--force' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
$this->components->info('ISO country reference data synchronised.');
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user