123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace App\Events;
- use Illuminate\Broadcasting\PrivateChannel;
- use Illuminate\Queue\SerializesModels;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Broadcasting\InteractsWithSockets;
- use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
- class OrderNotification implements ShouldBroadcast
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- public $resto_id;
- public $message;
- /**
- * Create a new event instance.
- *
- * @return void
- */
- public function __construct($resto_id)
- {
- $this->resto_id = $resto_id;
- $this->message = "New Order is placed";
- }
- /**
- * Get the channels the event should broadcast on.
- *
- * @return Channel|array
- */
- public function broadcastOn()
- {
- return new PrivateChannel('meem-order-production');
- }
- }
|