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

GlobalConfigUpdatedEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A broadcastOn() 0 3 1
A __construct() 0 3 1
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