Prefix is an optional argument, so default it to blank
This commit is contained in:
parent
27cdb02b06
commit
1753111f8f
@ -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'));
|
||||
}
|
||||
}
|
@ -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'));
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user