CommentAdded.php 635 B

12345678910111213141516171819202122232425262728
  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. use App\Models\Comment;
  11. class CommentAdded
  12. {
  13. use Dispatchable, InteractsWithSockets, SerializesModels;
  14. public Comment $comment;
  15. /**
  16. * Create a new event instance.
  17. */
  18. public function __construct(Comment $comment)
  19. {
  20. $this->comment = $comment;
  21. }
  22. }