Category: Laravel, PHP, javascript

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.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners