Merge pull request #12983 from snipe/features/add_optional_filename_to_backup_artisan

Add optional filename to backup
This commit is contained in:
snipe 2023-05-08 12:21:55 -07:00 committed by GitHub
commit 0f76eda4af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ class SystemBackup extends Command
* *
* @var string * @var string
*/ */
protected $name = 'snipeit:backup'; protected $signature = 'snipeit:backup {--filename=}';
/** /**
* The console command description. * The console command description.
@ -37,7 +37,11 @@ class SystemBackup extends Command
*/ */
public function handle() public function handle()
{ {
// if ($this->option('filename')) {
$this->call('backup:run'); $this->call('backup:run', ['--filename' => $this->option('filename')]);
} else {
$this->call('backup:run');
}
} }
} }