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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners