1 | <?php |
||
12 | class ContactCreated implements ShouldBroadcast |
||
13 | { |
||
14 | use SerializesModels; |
||
15 | |||
16 | public $contact; |
||
17 | |||
18 | /** |
||
19 | * Create a new event instance. |
||
20 | * |
||
21 | * @param \Rinvex\Contacts\Models\Contact $contact |
||
22 | */ |
||
23 | public function __construct(Contact $contact) |
||
27 | |||
28 | /** |
||
29 | * Get the channels the event should broadcast on. |
||
30 | * |
||
31 | * @return \Illuminate\Broadcasting\Channel |
||
32 | */ |
||
33 | public function broadcastOn() |
||
37 | |||
38 | /** |
||
39 | * The event's broadcast name. |
||
40 | * |
||
41 | * @return string |
||
42 | */ |
||
43 | public function broadcastAs() |
||
47 | |||
48 | /** |
||
49 | * Format channel name. |
||
50 | * |
||
51 | * @return string |
||
52 | */ |
||
53 | protected function formatChannelName(): string |
||
57 | } |
||
58 |