Once I have a command method, this one, it is possible to keep that commad running forever?
So far I have an ajax that calls for
You're running into that problem because the apache version of PHP has a timeout. By default the CLI version does not, so you can use PHP's
exec() function to run the artisan command which should work:
exec('php artisan socket:start');
As usual, only use this if you know exactly what is going into