Passed
Push — dev6 ( 5ebf7f...1a3248 )
by Ron
16:55
created

GlobalConfigUpdatedEvent::broadcastOn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Events\Admin;
4
5
use App\Http\Requests\admin\SettingsRequest;
6
use Illuminate\Broadcasting\Channel;
7
use Illuminate\Broadcasting\InteractsWithSockets;
8
use Illuminate\Broadcasting\PresenceChannel;
9
use Illuminate\Broadcasting\PrivateChannel;
10
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
11
use Illuminate\Foundation\Events\Dispatchable;
12
use Illuminate\Queue\SerializesModels;
13
14
class GlobalConfigUpdatedEvent
15
{
16
    use Dispatchable;
17
    use SerializesModels;
18
    use InteractsWithSockets;
19
20
    public $settings;
21
22
    /**
23
     * Create a new event instance.
24
     *
25
     * @return void
26
     */
27
    public function __construct(SettingsRequest $settings)
28
    {
29
        $this->settings = $settings;
30
    }
31
32
    /**
33
     * Get the channels the event should broadcast on.
34
     *
35
     * @return \Illuminate\Broadcasting\Channel|array
36
     */
37
    public function broadcastOn()
38
    {
39
        return new PrivateChannel('channel-name');
40
    }
41
}
42