Sometimes you may face an issue that database backup and restore works fine on command line php artisan dbm:backup but not works in Artisan::call('dbm:backup'). It's happend because mysql dumper artisan command needs to call from localhost. Try this solution.
Maybe you are running your project outside htdocs (xampp) or www(wamp) or running php artisan:serve (127.0.0.1:8000).
Try localhost
OR
Try to setup like this in your apache virtual host. I'm using xampp in windows 10. Here is my setup
Step 1: Open your domain in your hosts file. In my case C:\Windows\System32\drivers\etc\hosts
Add below line in the end of file.
Save the file.
Step 2: Setup virtual host to link your domain with your project.
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot C:\xampp\htdocs\project-folder\public
SetEnv APPLICATION_ENV "development"
<Directory C:\xampp\htdocs\project-folder\public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Change 'yourdomain.com' to your original domain and 'project-folder' to your own project folder.
Restart your server. Done!
If you still face the same issue then reply with details.
Thanks
Sometimes you may face an issue that database backup and restore works fine on command line
php artisan dbm:backupbut not works inArtisan::call('dbm:backup'). It's happend because mysql dumper artisan command needs to call from localhost. Try this solution.Maybe you are running your project outside
htdocs(xampp) orwww(wamp) or runningphp artisan:serve(127.0.0.1:8000).Try localhost
OR
Try to setup like this in your apache virtual host. I'm using xampp in windows 10. Here is my setup
Step 1: Open your domain in your hosts file. In my case
C:\Windows\System32\drivers\etc\hostsAdd below line in the end of file.
Save the file.
Step 2: Setup virtual host to link your domain with your project.
Change 'yourdomain.com' to your original domain and 'project-folder' to your own project folder.
Restart your server. Done!
If you still face the same issue then reply with details.
Thanks