BaseEvent.php 325 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Events;
  3. class BaseEvent
  4. {
  5. public $timestamp;
  6. /**
  7. * Create a new event instance.
  8. *
  9. * @return void
  10. */
  11. public function __construct()
  12. {
  13. $this->timestamp = time();
  14. }
  15. public function setTimestamp(int $time)
  16. {
  17. $this->timestamp = $time;
  18. }
  19. }