لاراول

کار با Echo

Get Real With Laravel Echo

Wouldn't it be great if you could alert the users of your application about important changes, without requiring that they manually refresh the page? What if an order status automatically refreshed itself? What if a thread could instantly render new incoming replies? All of this is a cinch if we leverage Laravel events, Pusher, and Laravel Echo.

سطح حرفه ای 8 جلسه آموزشی 01:09:00 ساعت
01
قسمت 1

Initial Broadcasting Setup

Let's begin by scaffolding a new Laravel app, and pulling in the necessary dependencies to begin broadcasting server-side events to the client.

02
قسمت 2

Pushing to Pusher

Now that we understand how to broadcast an event, let's switch from the log driver over to something more exciting: Pusher. In this episode, we'll learn how to fire a Laravel event, and send it straight to Pusher.

03
قسمت 3

Listening For Messages With Laravel Echo

Now that server-side events are properly being sent to Pusher, let's tackle the next layer of the onion. Using Laravel Echo (and the pusher-js library), we'll open a channel and listen for all relevant messages. If one comes through, we can immediate...

04
قسمت 4

Instant Feedback

Now that we understand the basic flow for broadcasting an event, let's make things a bit more visual. Imagine that you're working on a task list with a friend or spouse located anywhere in the world. Wouldn't it be nice if, each time you add a new ta...

05
قسمت 5

Public Channels and Sensitive Data Don't Mix

As a basic rule, if the event you're broadcasting is sensitive in nature (order details, direct messaging, etc.), then you should reach for a PrivateChannel. This way, you can assign special authorization rules for the message. Let's review why this...

06
قسمت 6

Private Channels

Now that we understand what the problem is, we can implement a solution. In this episode, we'll switch to using a private channel. As part of this process, we can also specify any number of broadcasting authorization rules within routes/channels.php.

07
قسمت 7

Whispering Client Events

From time to time you'll want to trigger an event that is dispersed to all fellow clients connected to your private Pusher channel, without going through your backend server. A common example of this is the "JohnDoe is typing..." feedback you might r...

08
قسمت 8

Presence Channels

Presence channels build upon private channels, by providing extra awareness functionality. The most common example of this is a basic chat room. If we need to track all users, detect when new people join, or when others exit the room, a presence chan...

دوره در حال اجرا

این دوره هنوز به پایان نرسیده است و در آینده درس های دیگری به آن افزوده خواهد شد.