25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
395B

  1. <?php
  2. namespace App\Models;
  3. use CodeIgniter\Model;
  4. class DepartamentoModel extends Model
  5. {
  6. protected $table = 'departamento';
  7. protected $primaryKey = 'iddepartamento';
  8. function getDepartamentos()
  9. {
  10. return $this->select(['iddepartamento', 'nombre'])
  11. ->where('status', '1')
  12. ->orderBy('nombre')
  13. ->findAll();
  14. }
  15. }