Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Independent

Build a Realtime Chat with Laravel, Vue and Pinia

via Independent

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Using the power of Reverb, let’s build a realtime multi-room chat with Laravel and Vue with Inertia, pulling in Pinia for state management.

We’ll cover:
  • Using the Intersection Observer API to automatically load previous chat messages
  • State management with Pinia
  • Using presence channels to show online users for each room
  • Client-to client communication to show who’s typing
  • Using flexbox tricks to keep messages scrolled into view as they roll in

Syllabus

  • 01. Introduction
  • 02. Setting up
  • 03. Scaffolding chat rooms
  • 04. Building a chat textarea
  • 05. Seeding fake messages in order
  • 06. Creating a Pinia store
  • 07. Creating the messages endpoint
  • 08. Fetching messages into our store
  • 09. Ordering messages with flexbox
  • 10. Using the intersection observer API
  • 11. Fetching and pushing previous messages
  • 12. Storing and appending messages
  • 13. Setting up Reverb
  • 14. Broadcasting new messages
  • 15. Handling broadcasted messages in our store
  • 16. Fetching online users
  • 17. Storing online user state
  • 18. Keeping online users in sync
  • 19. Detecting typing events
  • 20. Showing when a user is typing
  • 21. Better formatted dates

Taught by

Alex Garrett-Smith

Reviews

Start your review of Build a Realtime Chat with Laravel, Vue and Pinia

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.