laravel - 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();
}
}
解决方案
推荐阅读
- java - Linux - 格式化 ls -l 命令
- python - 如何从三个 ReceiveStream 中一次读取一行?
- operating-system - 多核处理器中的 CPU 利用率
- youtube-api - 如何获取 youtube API 的开发者密钥?
- sql - 根据同一张表中是否存在相关行获取行
- c++ - WinAPI 在记事本中挂钩 CreateFileW
- php - 排序后的 JSON 仍然部分乱序
- r - 在 R 中创建一个 for 循环
- python - PyQt5 从多个 Qwidget 读取值并转换为类
- jquery - 带有 Fancybox 3 的 Plyr.js,多个视频未初始化