I have created a Job file in the folder app/Jobs/MyJob.php and i would like to run it just once, if its possible using command line.
what command should I use to run a method in this file or the handle?
If you are using a QUEUE_DRIVER diferent to sync and you want to dispatch a queue that you have created before, from your project folder run the command:
php artisan queue:work --queue=MyQueueName
Hope it works!!
The code below solved my problem:
$messages ...READ MORE
cache:clear artisan command does calls flush function on current ...READ MORE
You can use less code, writing ...READ MORE
Facades provide a "static" interface to classes ...READ MORE
First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
This is simple you just need to ...READ MORE
Named routing is another amazing feature of ...READ MORE
It's not really Eloquent, to add ...READ MORE
Already have an account? Sign in.