In this episode, we’re setting up a fresh Laravel app and getting Laravel Reverb ready for real-time broadcasting. We walk through installing everything from scratch using the laravel new
command (our project is called "Larachat," but you can name yours whatever you like).
After spinning up the new app, we install basic authentication with Laravel Breeze and Livewire, choose a database (MySQL), and get migrations running. Once the project is open in our editor, we fire up npm run dev
to get assets compiling and set up multiple terminals: one for the server, one for Laravel Reverb, and another for general commands. We even quickly register a user just to make sure everything’s working and end up on the dashboard.
With the app bootstrapped, we use the handy php artisan install broadcasting
command to install Laravel’s broadcasting features and Laravel Reverb at the same time. The process updates our environment variables and JavaScript files automatically, including setting up the Reverb connection and adding an Echo client for the frontend so we can listen for broadcast events.
We briefly check out the important config changes and explain the basics of channel routing for broadcasting to rooms (think chat rooms per topic like "laravel" or "livewire"). Finally, we actually start the Reverb server using the php artisan reverb:start --debug
command. With everything running, any new broadcast events or presence channel activity will show up in real time in our terminal.
So by the end of this episode, you’ll have Laravel broadcasting and Reverb installed, configured, and running locally—ready to build out real-time functionality in your app!