Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Broadcasting;
4
 
5
use Illuminate\Support\Facades\Broadcast;
6
 
7
trait InteractsWithSockets
8
{
9
    /**
10
     * The socket ID for the user that raised the event.
11
     *
12
     * @var string|null
13
     */
14
    public $socket;
15
 
16
    /**
17
     * Exclude the current user from receiving the broadcast.
18
     *
19
     * @return $this
20
     */
21
    public function dontBroadcastToCurrentUser()
22
    {
23
        $this->socket = Broadcast::socket();
24
 
25
        return $this;
26
    }
27
 
28
    /**
29
     * Broadcast the event to everyone.
30
     *
31
     * @return $this
32
     */
33
    public function broadcastToEveryone()
34
    {
35
        $this->socket = null;
36
 
37
        return $this;
38
    }
39
}