I need to create a Laravel daemon to get some data from the net and store them in a database.I would like to do this in Laravel in order to use Eloquent for my queries. I was told to take a look at queues but as I can see in the documentation a queue is called if you access a url first. Is there any way to start a queue and make it run forever? Will queues work in my local environment?So far I have the following code:
routes.php:
Route::get('daemon', function(){
Queue::push('SendEmail', []);
});
SendEmail.php
<?php
class SendEmail {
public function fire($job, $data)
{
dd('ok');
}
}
But I get class SendEmail does not exist