diff --git a/app/Console/Commands/EchoareaImport.php b/app/Console/Commands/EchoareaImport.php index 6dfb3b8..01ba12e 100644 --- a/app/Console/Commands/EchoareaImport.php +++ b/app/Console/Commands/EchoareaImport.php @@ -35,6 +35,6 @@ class EchoareaImport extends Command public function handle(): int { $do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail(); - return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix'),$this->option('unlink')); + return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix') ?: '',$this->option('unlink')); } } \ No newline at end of file diff --git a/app/Console/Commands/FileareaImport.php b/app/Console/Commands/FileareaImport.php index 6832e0e..8efd8df 100644 --- a/app/Console/Commands/FileareaImport.php +++ b/app/Console/Commands/FileareaImport.php @@ -35,6 +35,6 @@ class FileareaImport extends Command public function handle(): int { $do = Domain::where('name',strtolower($this->argument('domain')))->singleOrFail(); - return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix'),$this->option('unlink')); + return Job::dispatchSync($this->argument('file'),$do,$this->option('prefix') ?: '',$this->option('unlink')); } } \ No newline at end of file diff --git a/app/Jobs/EchoareaImport.php b/app/Jobs/EchoareaImport.php index a8f0b42..9469211 100644 --- a/app/Jobs/EchoareaImport.php +++ b/app/Jobs/EchoareaImport.php @@ -35,7 +35,7 @@ class EchoareaImport implements ShouldQueue * @param bool $delete_recs * @param bool $delete_file */ - public function __construct(string $file,Domain $do,string $prefix,bool $delete_recs=FALSE,bool $delete_file=FALSE) + public function __construct(string $file,Domain $do,string $prefix='',bool $delete_recs=FALSE,bool $delete_file=FALSE) { $this->file = $file; $this->do = $do; diff --git a/app/Jobs/FileareaImport.php b/app/Jobs/FileareaImport.php index 464ce7a..5cfa049 100644 --- a/app/Jobs/FileareaImport.php +++ b/app/Jobs/FileareaImport.php @@ -35,7 +35,7 @@ class FileareaImport implements ShouldQueue * @param bool $delete_recs * @param bool $delete_file */ - public function __construct(string $file,Domain $do,string $prefix,bool $delete_recs=FALSE,bool $delete_file=FALSE) + public function __construct(string $file,Domain $do,string $prefix='',bool $delete_recs=FALSE,bool $delete_file=FALSE) { $this->file = $file; $this->do = $do;