Issues (210)

src/Events/GeneralPushNotificationEvent.php (1 issue)

Severity
1
<?php
2
3
namespace Pratiksh\Adminetic\Events;
4
5
use Illuminate\Broadcasting\InteractsWithSockets;
6
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
7
use Illuminate\Foundation\Events\Dispatchable;
8
use Illuminate\Queue\SerializesModels;
9
10
class GeneralPushNotificationEvent implements ShouldBroadcastNow
11
{
12
    use Dispatchable, InteractsWithSockets, SerializesModels;
0 ignored issues
show
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Pratiksh\Adminetic\Event...alPushNotificationEvent: $id, $relations, $class, $connection, $keyBy
Loading history...
13
    public $data;
14
15
    /**
16
     * Create a new event instance.
17
     *
18
     * @return void
19
     */
20
    public function __construct($data)
21
    {
22
        $this->data = $data;
23
    }
24
25
    /**
26
     * Get the channels the event should broadcast on.
27
     *
28
     * @return \Illuminate\Broadcasting\Channel|array
29
     */
30
    public function broadcastOn()
31
    {
32
        return ['general_push_notification'];
33
    }
34
35
    public function broadcastAs()
36
    {
37
        return 'general-push-notification-event';
38
    }
39
}
40