FileUploadedEvent.php 628 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Module\File\Events;
  3. use App\Module\File\Models\FileFile;
  4. use Illuminate\Broadcasting\InteractsWithSockets;
  5. use Illuminate\Foundation\Events\Dispatchable;
  6. use Illuminate\Queue\SerializesModels;
  7. /**
  8. * 文件上传事件
  9. */
  10. class FileUploadedEvent
  11. {
  12. use Dispatchable, InteractsWithSockets, SerializesModels;
  13. /**
  14. * 文件模型
  15. *
  16. * @var FileFile
  17. */
  18. public FileFile $file;
  19. /**
  20. * 创建一个新的事件实例
  21. *
  22. * @param FileFile $file
  23. * @return void
  24. */
  25. public function __construct(FileFile $file)
  26. {
  27. $this->file = $file;
  28. }
  29. }