UserLevelListener.php 529 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\listener\user;
  3. use app\services\user\UserLevelServices;
  4. use crmeb\interfaces\ListenerInterface;
  5. /**
  6. * 用户升级事件
  7. * Class UserLevelListener
  8. * @package app\listener\user
  9. */
  10. class UserLevelListener implements ListenerInterface
  11. {
  12. public function handle($event): void
  13. {
  14. [$uid] = $event;
  15. //用户升级
  16. /** @var UserLevelServices $levelServices */
  17. $levelServices = app()->make(UserLevelServices::class);
  18. $levelServices->detection((int)$uid);
  19. }
  20. }