WaybillPriceModelEvent.php 736 B

123456789101112131415161718192021222324252627282930313233343536
  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. * @param WaybillPriceModel $waybillPriceModel
  14. *
  15. * @return void
  16. */
  17. public function __construct(WaybillPriceModel $waybillPriceModel)
  18. {
  19. $this->waybillPriceModel=$waybillPriceModel;
  20. }
  21. /**
  22. * Get the channels the event should broadcast on.
  23. *
  24. * @return \Illuminate\Broadcasting\Channel|array
  25. */
  26. public function broadcastOn()
  27. {
  28. return new PrivateChannel('channel-name');
  29. }
  30. }