GitPushedEvent.php 1001 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace App\Events;
  3. use Illuminate\Broadcasting\Channel;
  4. use Illuminate\Broadcasting\InteractsWithSockets;
  5. use Illuminate\Broadcasting\PresenceChannel;
  6. use Illuminate\Broadcasting\PrivateChannel;
  7. use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
  8. use Illuminate\Foundation\Events\Dispatchable;
  9. use Illuminate\Queue\SerializesModels;
  10. class GitPushedEvent
  11. {
  12. use Dispatchable, InteractsWithSockets, SerializesModels;
  13. public $email;
  14. /**
  15. * [
  16. * 'title'=>''
  17. * 'description'='信息'
  18. * ]
  19. */
  20. public $load;
  21. /**
  22. * GitPushedEvent constructor.
  23. * @param $email
  24. * @param $load
  25. */
  26. public function __construct($email, $load)
  27. {
  28. $this->email = $email;
  29. $this->load = $load;
  30. }
  31. /**
  32. * Get the channels the event should broadcast on.
  33. *
  34. * @return \Illuminate\Broadcasting\Channel|array
  35. */
  36. public function broadcastOn()
  37. {
  38. return new PrivateChannel('channel-name');
  39. }
  40. }