ConfigRepository.php 664 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Repositories;
  3. use App\Models\Config;
  4. class ConfigRepository extends BaseRepository
  5. {
  6. public function __construct(Config $config)
  7. {
  8. $this->model = $config;
  9. }
  10. /**
  11. * 获取安卓最小版本
  12. * */
  13. public function getMiniAndroidVersion()
  14. {
  15. $con = $this->model->where('slug','Android')->first();
  16. $version = $con->value ?? '';
  17. return $version;
  18. }
  19. /**
  20. * 获取苹果最小版本
  21. * */
  22. public function getMiniIosVersion()
  23. {
  24. $con = $this->model->where('slug','ios')->first();
  25. $version = $con->value ?? '';
  26. return $version;
  27. }
  28. }