1
$doBackUp = Artisan::call('backup:run --only-db');
return back()->with('success', __('Completed!The :x has been successfully completed.', ['x' => __('database backup')]));

This is the backup file in storage>app>Laravel> Laravel_2023-05-04-06-31-18.zip

I want to store the the zip file name in database Laravel_2023-05-04-06-31-18.zip.

How do I get the name of the backup file to store in the database, as it just returns only boolean values?

Thank you.

Imtiaze
  • 43
  • 9
  • Maybe one of the events fired during the backup can be used. Check https://spatie.be/docs/laravel-backup/v8/taking-backups/events – Coola May 04 '23 at 01:22

0 Answers0