首页 > 解决方案 > Backup failed in Browser, works with php artisan backup:run

问题描述

I am new to Laravel, I have created a driver with the create function to create backups to my database on xampp server, but my problem is that in the browser it does not show me any errors but no backup of my database is created. Help me please. Here I leave the code of my create function.

      public function create()
        {
                 try {
                // start the backup process
                Artisan::call('backup:run', ['--only-db'=> true,'--disable-notifications'=> true]);
                $output = Artisan::output();
                // log the results
               Log::info("Backpack\BackupManager -- new backup started from admin interface \r\n" . $output);
                // return the results as a response to the ajax call
                Alert::success('Nuevo Backup Creado');
               return redirect()->back();
           } catch (Exception $e) {
               Flash::error($e->getMessage());
                return redirect()->back();
            }

        }

标签: laravel

解决方案


推荐阅读