If the goal is for this Artisan command to run every five minutes, then we should think of a way to notify the user each time an important stock change occurs. For example, if an item was out of stock yesterday, but is now in stock, we should email the user so they can go buy it right away.
Let's test out a typical event + listener approach, before adopting use-cases in the following episode.
View the source code for this episode on GitHub.
Published on May 20th, 2020.