ClockoutEvent.php 716 B

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