larkinwhitaker / laravel-db-backup

Laravel 5 Package for easily backing up and restoring databases with command line tools.
http://keystrokecreative.com/
15 stars 17 forks source link

Can't works via controller code #9

Open awadheshmeshram opened 5 years ago

awadheshmeshram commented 5 years ago

That package works fine in the terminal with this command php artisan db:back --database=mysql but when i try to execute via the controller code, it doesn't work and this is my code snipped-

 Artisan::call('db:backup',['--database'=>'mysql']);//this is command

 return Redirect::back()->with('success','Database backup was successful, 
.SQL file was saved in dump folder.');

I also try with this code but doesn't work

Artisan::call('db:backup',['--database'=>'mysql']); Artisan::call('db:backup'); Please, anyone, help me out exactly where is the problem?