0

while running below artisan command from controller works fine

Artisan::call('backup:run');

but why this is not working

Artisan::call('backup:run --only-db');

it throws error The command "backup:run --only-db" does not exist.

through CLI it works fine

php artisan backup:db --only-db
apokryfos
  • 38,771
  • 9
  • 70
  • 114
Milan Tarami
  • 70
  • 1
  • 8

1 Answers1

5

I believe what you wanted to do is.

Artisan::call('backup:run',['--only-db'=>true]);
Zoe
  • 27,060
  • 21
  • 118
  • 148
rapulu
  • 160
  • 1
  • 10