User.php 510 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Ycbl\AdminAuth\Dao;
  3. use Hyperf\Contract\ConfigInterface;
  4. use Psr\Container\ContainerInterface;
  5. use Ycbl\AdminAuth\Model\User as Model;
  6. class User
  7. {
  8. /**
  9. * @var Model
  10. */
  11. protected $model;
  12. public function __construct(ContainerInterface $container, ConfigInterface $config)
  13. {
  14. $this->model = $container->get($config->get('admin_auth.auth_user'));
  15. }
  16. public function getAllUserIds()
  17. {
  18. return $this->model::query()->get()->pluck('id');
  19. }
  20. }