Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Building Realtime Web Apps with Laravel, Vue 3 and Reverb
Rating: 5.0 out of 5(1 rating)
39 students

Building Realtime Web Apps with Laravel, Vue 3 and Reverb

Learn how to build realtime applications with Laravel 11, Vue 3 and Reverb, along with Pinia for state management
Created byTapan Sharma
Last updated 4/2025
English
English [Auto],

What you'll learn

  • Learn how to build realtime applications with Laravel (with Sanctum, Reverb) and Vue 3 (SPA)
  • Learn how to configure Laravel Sanctum (along with Fortify) to serve a Frontend SPA
  • Learn how to setup broadcasting in Laravel and listen for events in our Vue 3 app using Echo
  • Learn how to configure and implement private broadcasting in an API/SPA environment
  • Learn how to implement an infinite scrolling behaviour in a Vue 3 app
  • We'll also learn how to implement login (which is session based implemented with Sanctum)
  • Learn State management with Pinia

Course content

2 sections35 lectures4h 40m total length
  • Setting Up Laravel and Vue Projects4:43

    Set up a Laravel backend and a Vue 3 frontend by installing fresh projects via the Laravel installer or composer, choosing sqlite, and using API-only scaffolding for a dedicated frontend.

  • Running On the Same Domain3:54

    organize the back end and front-end in a single folder and repo, serve on the same domain (backend.test), and plan to configure sanctum for front-end and back-end communication.

  • Install and Configure Sanctum6:33

    Install and configure Laravel Sanctum to enable spa authentication between the backend and a js app, publish migrations, set up middleware and env domains, and configure csrf cookies.

  • Install and Configure Broadcasting6:46

    Learn to enable real-time broadcasting in a Laravel app by installing broadcasting and Laravel Reverb. Configure env and Reverb settings and review changed files for backend and front-end WebSocket integration.

  • Configuring Broadcasting in the Frontend11:40

    Configure the front end to listen for backend broadcasts using Laravel Echo, pusher-js, and Axios; set up env credentials, register a front end plugin, and test WebSocket connectivity.

  • Testing Real Time Functionality5:45

    Test real-time functionality by broadcasting a Post Created event from the Laravel back end to a public posts channel and listening in Vue 3 with a Reverb server.

  • Install and Configure Laravel Fortify5:16

    Install and configure Laravel Fortify to provide backend authentication APIs, enable login, two-factor authentication, and password management, while preparing private channels for real-time features.

  • A Quick Authentication Test12:06

    Implement a quick authentication test by configuring Sanctum and Laravel Fortify, cleaning the frontend, and using a reactive login form with axios for CSRF, login, credentials, and seeding test user.

  • Installing Tailwind3:43

    Install tailwind css for the project, configure postcss and tailwind with Vue.js components, install tailwind forms plugin, run npm run dev, fix postcss config errors, and prepare for navigation design.

  • Let's Work on the Nav3:45

    Configure a site-wide navigation by embedding a navigation component in app.vue and render it on all pages, while planning the login flow and real-time post timeline features.

  • An Introduction to Composables7:11

    Explore how composables encapsulate state and logic in simple JavaScript files, export them, and import them into components to manage login flow with a useAuth composable.

  • Moving Auth Logic to a Composable6:24

    Move authentication logic into a composable to separate business from UI logic, defining an authenticated boolean, a user object, and a login function that calls the backend.

  • Attempting Authentication5:38

    This lecture demonstrates fetching the currently authenticated user after login using an auth composable, updating the user and authentication state, and rendering nav links based on authentication.

  • Authenticating on Reload4:33

    Call the attempt method from the use auth composable before app mount to persist the authenticated user on reload, ensuring the login state survives page refresh.

  • Finalizing the Login Flow10:03

    Design and implement a complete login flow in a Laravel 11 and Vue 3 SPA, including a login page with email and password, route setup, Sanctum authentication, and navigation.

Requirements

  • Beginner level knowledge of PHP/Laravel is Required
  • Beginner level knowledge of VueJS 3 is Required

Description

Using the power of Laravel Reverb, let’s build a real-time post-timeline application with Laravel 11, VueJS 3, Sanctum, and Reverb,  pulling in Pinia for state management.


Projects Roadmap and Status:

[Uploaded] A Guide to Setup Laravel with Vue 3 and Reverb

[Uploaded] Let's Build a Realtime Post Timeline Project


Project Description:


[Uploaded] A Guide to Setup Laravel with Vue 3 and Reverb

In this section, we'll look into the basics of Laravel and Vue, by setting up both projects.

Some of the topics we'll cover in this section include:

  • Learn how to set up Laravel Sanctum to serve an SPA.

  • Look into the basics of broadcasting in Laravel and our frontend Vue 3 app.

  • We'll also configure private broadcasting in our front-end app.

  • Learn how to use composable in Vue 3

  • Learn how to implement authentication features like login flow, and grab the user data on reload.


[Uploaded] Let's Build a Realtime Post Timeline Project

In this section, we'll build a real-time post timeline project, where the users can create posts, view all the posts, and like the posts, all of these interactions will be real-time, and we'll also implement an infinite scrolling feature.


Some of the topics we'll cover in this section include:

  • Learn how to create posts and broadcast that event to show the created post in real time.

  • Learn how to display server-driven validation errors.

  • We'll learn how to implement an infinite scrolling feature in Vue 3 with the API served by Laravel.

  • We'll learn how to manage the state of our app using Pinia

  • Learn how to like the posts and broadcast the Liked event to implement real-time functionality

  • Learn how to Edit the posts and implement real-time editing functionality

  • And many more topics.


Course Summary:

  • Building real-time applications with Laravel (with Sanctum, Reverb) and Vue 3 (SPA)

  • Configuring Laravel Sanctum (along with Fortify) to serve a Frontend SPA

  • Setting up  broadcasting in Laravel and listening for events in our Vue 3 app using Laravel Echo

  • Configuring and implementing private broadcasting in an API/SPA environment

  • Using the Intersection Observer API to load the next chunk of posts automatically when the user scrolls to the bottom of the timeline

  • Learn database seeding techniques in Laravel

  • Learn how to use API Resources in Laravel

  • Learn how to listen for Broadcasted events from the backend and react to them accordingly in the frontend

  • All of this state will be managed on the client side, using Pinia


By the end of this course, you will have built a feature-rich, real-time timeline application that showcases your understanding of front-end and back-end technologies, perfect for any aspiring developer looking to enhance their skills in dynamic web application development.

Who this course is for:

  • Laravel Developers who want to Build Realtime web applications using Vue 3 and Reverb
  • VueJS Developers who want to learn how to integrate Laravel with Reverb to build Real-Time Applications