add silaras to git repo
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class PasienModel extends Model
|
||||
{
|
||||
protected $table = 'pasien';
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
protected $allowedFields = [
|
||||
'rm',
|
||||
'nama',
|
||||
'tgl_lahir',
|
||||
'gender',
|
||||
'alamat'
|
||||
];
|
||||
|
||||
protected $useTimestamps = true;
|
||||
protected $createdField = 'created_at';
|
||||
protected $updatedField = 'updated_at';
|
||||
|
||||
// 🔵 cari pasien berdasarkan RM
|
||||
public function findByRM($rm)
|
||||
{
|
||||
return $this->where('rm', $rm)->first();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user