laravel-backup
laravel-backup copied to clipboard
Command responses
Hi schickling,
Great package, very useful. I have a question though, How can we retrive the status of the command? i.e if the command failed or not? So we an flash a message to the view?
Regards
Hi @Corvisier,
if you look into the source you should find what you were looking for:
https://github.com/schickling/laravel-backup/blob/master/src/Schickling/Backup/Commands/BackupCommand.php#L41
Hi @schickling, Thanks for the fast reply. I checked the source code before posting hence the question. I use it like this from the controller:
Artisan::call('db:backup');
I know I need to check for the status so I can display a message that's not the problem. It's just how do I pass $status to my controller? Sorry for the noob question...
Regards
Well, the plugin wasn't built for that purpose. I'm not sure how Artisan::call
handles a response status.