paulvl/backup

php artisan mysql-dump custom_file How to Execute From Code

Closed this issue · 5 comments

in My Function Code Executes:

public function execute(){
Artisan::call('backup:mysql-dump');

My Question is How To Write Code for Executing Command

php artisan mysql-dump custom_file

up

You can pass parameters to programic artisan commands by passing an array as the second parameter.

\Artisan::call('backup:mysql-dump', [
    'custom_file' => 'for_bar'
]);

https://laravel.com/docs/master/artisan#programmatically-executing-commands

Thank You Guys
it Worked! ))

i have same problem try the example and not work

@NazarAli have you tried the proposed answer from @Dewbud on #21 (comment)