From 85243423cf475af0109ed44af89ad5c9d0255a83 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 8 May 2023 12:20:43 -0700 Subject: [PATCH] Add optional filename to backup Signed-off-by: snipe --- app/Console/Commands/SystemBackup.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/SystemBackup.php b/app/Console/Commands/SystemBackup.php index b7ca526052..09f23dd887 100644 --- a/app/Console/Commands/SystemBackup.php +++ b/app/Console/Commands/SystemBackup.php @@ -11,7 +11,7 @@ class SystemBackup extends Command * * @var string */ - protected $name = 'snipeit:backup'; + protected $signature = 'snipeit:backup {--filename=}'; /** * The console command description. @@ -37,7 +37,11 @@ class SystemBackup extends Command */ public function handle() { - // - $this->call('backup:run'); + if ($this->option('filename')) { + $this->call('backup:run', ['--filename' => $this->option('filename')]); + } else { + $this->call('backup:run'); + } + } }