Passed
Push — dev6 ( edb7de...3fa4bc )
by Ron
15:53
created

NewCustomerCreated::__construct()   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 1
1
<?php
2
3
namespace App\Events;
4
5
use App\Models\Customer;
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 NewCustomerCreated
15
{
16
    use Dispatchable, InteractsWithSockets, SerializesModels;
1 ignored issue
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by App\Events\NewCustomerCreated: $id, $relations, $class, $connection, $keyBy
Loading history...
17
18
    public $customer;
19
20
    /**
21
     * Create a new event instance.
22
     *
23
     * @return void
24
     */
25
    public function __construct(Customer $customer)
26
    {
27
        $this->customer = $customer;
28
    }
29
30
    /**
31
     * Get the channels the event should broadcast on.
32
     *
33
     * @return \Illuminate\Broadcasting\Channel|array
34
     */
35
    // public function broadcastOn()
36
    // {
37
    //     return new PrivateChannel('channel-name');
38
    // }
39
}
40