Laravel – How to call worker command from code


I wanted to write an endpoint in my code for running the below command. How can i do that?

worker: php artisan queue:work --queue=high,default.

Am using this command because as php artisan queue:work --queue=high,default will not work on herokku server.

i know artisan::call('queue:work --queue=high,default'); is the way to call the php artisan queue:work --queue=high,default.But how to call it when worker is added in the start.

Source: Laravel

Categorised as heroku, laravel, laravel-8, laravel-artisan, php Tagged , , , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us