WaybillPriceModelEvent.php 678 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Events;
  3. use App\WaybillPriceModel;
  4. use Illuminate\Queue\SerializesModels;
  5. use Illuminate\Broadcasting\PrivateChannel;
  6. class WaybillPriceModelEvent
  7. {
  8. use SerializesModels;
  9. public $waybillPriceModel;
  10. /**
  11. * Create a new event instance.
  12. *
  13. * @return void
  14. */
  15. public function __construct(WaybillPriceModel $waybillPriceModel)
  16. {
  17. $this->waybillPriceModel=$waybillPriceModel;
  18. }
  19. /**
  20. * Get the channels the event should broadcast on.
  21. *
  22. * @return \Illuminate\Broadcasting\Channel|array
  23. */
  24. public function broadcastOn()
  25. {
  26. return new PrivateChannel('channel-name');
  27. }
  28. }