TeamAuditEvent.php 726 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App\Events;
  3. use App\LaborReport;
  4. use App\UserDutyCheck;
  5. use Illuminate\Broadcasting\Channel;
  6. use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
  7. use Illuminate\Queue\SerializesModels;
  8. class TeamAuditEvent implements ShouldBroadcast
  9. {
  10. use SerializesModels;
  11. public $laborReport;
  12. /**
  13. * Create a new event instance.
  14. *
  15. * @return void
  16. */
  17. public function __construct(LaborReport $laborReport)
  18. {
  19. $this->laborReport=$laborReport;
  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 Channel('laborReport');
  29. }
  30. }