Open utterances-bot opened 4 years ago
Let's say I am listening for a hashtag which is coming from a database. How can I restart the command so that I can listen to a new hashtag, if the value in database changes.
Can I trigger some event and force the command to restart?
Thanks for the quick reply.
Yes, I followed the article. However, I am not able to understand how to restart the command. Let me try to explain the scenario again (maybe I was not clear in my first comment so sorry about that)
So, I want that the hashtag will come from the database. But, when the hashtag changes how do I restart the command which is already running.
Like, I am listening to publicStream of #laravel. And then, I changed the value in the database to #javascript. So, now I want to restart the TwitterStreamingApi::publicStream which is already listening to #laravel.
Easily work with the Twitter Streaming API in PHP - Freek Van der Herten's blog on PHP, Laravel and JavaScript
Freek Van der Herten is a developer and partner at Spatie.
https://freek.dev/671-easily-work-with-the-twitter-streaming-api-in-php