您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

24 行
549B

  1. <?php
  2. namespace App\Models;
  3. use CodeIgniter\Model;
  4. class UsuarioModel extends Model
  5. {
  6. protected $table = 'usuarios';
  7. protected $primaryKey = 'idusuario';
  8. protected $useAutoIncrement = true;
  9. protected $insertID = 0;
  10. protected $returnType = 'array';
  11. protected $useSoftDeletes = false;
  12. protected $protectFields = true;
  13. protected $allowedFields = [];
  14. public function findByUsername($username)
  15. {
  16. return $this->where('nombreusuario', $username)->first();
  17. }
  18. }