User.php 515 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Models;
  3. class User extends SoftBaseModel
  4. {
  5. /**
  6. * 性别 0:未知
  7. * @var integer
  8. */
  9. const WX_SEX_0 = 0;
  10. /**
  11. * 性别 1:男性
  12. * @var integer
  13. */
  14. const WX_SEX_1 = 1;
  15. /**
  16. * 性别 2:女性
  17. * @var integer
  18. */
  19. const WX_SEX_2 = 2;
  20. public function getThirdUpHeadimgAttribute()
  21. {
  22. return isset($this->attributes['third_up_headimg']) ? config('console.pic_path').$this->attributes['third_up_headimg'] : '';
  23. }
  24. }