GuessAskLanguages.php 504 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\admin\model;
  3. use app\BaseModel;
  4. class GuessAskLanguages extends BaseModel
  5. {
  6. protected $appends = ['type_text'];
  7. public function getTypeTextAttribute()
  8. {
  9. $list = self::typeList(false);
  10. return $list[$this->type] ?? '';
  11. }
  12. public static function typeList($select = true)
  13. {
  14. $list = [
  15. 1 => '问题',
  16. ];
  17. if ($select) {
  18. $list = getSelectData($list);
  19. }
  20. return $list;
  21. }
  22. }