To begin, let's have a look at the Philips Hue REST API. We'll figure out how to toggle the lights in our room and adjust their colors.
Now let's leverage Vue 3 and Tailwind to build a simple client app that allows us to control our lights from any web browser.
We can hook into PHPUnit's events, like for passing or failing tests, to change the color of our lights accordingly. GitHub Repo: https://github.com/drehimself/lc-hue-phpunit
Let's begin by styling our app with Tailwind CSS and extracting it to a Blade component.
We can use the OpenWeather API along with Laravel's HTTP client to fetch data for our current and future forecasts.
We can make our application more interactive by pulling in Algolia Places for our dropdown of cities. The query string will help us keep track of the currently selected city and keep the majority of logic on the backend.
Let's now make our Weather widget interactive by extracting it to a Vue component. We'll move much of the logic over from Laravel into Vue and allow it to update whenever the location is changed from the Places API.
We can also use Livewire to make our weather widget interactive. We'll re-use much of the logic from the Blade components we created, but make a few changes to make it work with Livewire. We'll also pull in Alpine.js for some simple DOM manipulation.