Laravel’s newest no-configuration WebSocket Broadcaster, Larasocket, with Laravel’s newest technologies: TailwindCSS, AlpineJS, and Livewire. Laravel has a new Broadcaster: Larasocket. Today, we are going to see how we can use Larasocket with Tailwind, Alpine, and Livewire to build a beautiful, and lightweight real-time chat room.
Over in config/broadcasting.php we need to add the Larasocket driver as an option: And let’s update bootstrap.js to use Larasocket instead of the default Pusher: The last thing we need to do for Larasocket is to update our .env file: Just remember to replace with your token from Larasocket.
Styling our elements in using Tailwind has a few key advantages: We are now ready to give our application using the Tailwind, AlpineJS, Livewire, and Laravel stack a go.