領収証発行サービス
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 line
805B

  1. <?php
  2. namespace App\Events\Model;
  3. use App\Models\Feature\IModelFeature;
  4. use Illuminate\Broadcasting\InteractsWithSockets;
  5. use Illuminate\Broadcasting\PrivateChannel;
  6. use Illuminate\Foundation\Events\Dispatchable;
  7. use Illuminate\Queue\SerializesModels;
  8. abstract class ModelChangeEvent
  9. {
  10. use Dispatchable, InteractsWithSockets, SerializesModels;
  11. public IModelFeature $model;
  12. /**
  13. * Create a new event instance.
  14. */
  15. public function __construct(IModelFeature $model)
  16. {
  17. $this->model = $model;
  18. }
  19. /**
  20. * Get the channels the event should broadcast on.
  21. *
  22. * @return array<int, \Illuminate\Broadcasting\Channel>
  23. */
  24. public function broadcastOn(): array
  25. {
  26. return [
  27. new PrivateChannel('channel-name'),
  28. ];
  29. }
  30. }