updated streamline-setup v2

This commit is contained in:
2025-01-15 08:53:49 -08:00
committed by alec.turner
parent a2ce9248f0
commit 4b569f81b0
20228 changed files with 2932048 additions and 63204 deletions
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace Streamline\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use OwenIt\Auditing\Contracts\Auditable;
class Patient extends Model implements Auditable {
public $timestamps = true;
protected $fillable = [
'number',
'first_name',
'last_name',
'date_of_birth',
'marital_status',
'national_id',
'occupation',
'religion',
'patient_category',
'district_id',
'county_id',
'subcounty_id',
'parish',
'village'
];
protected $dates = ['date_of_birth', 'deleted_at'];
// use laravel-auditing to track database changes
use \OwenIt\Auditing\Auditable;
// use for soft deletes
use SoftDeletes;
/* added this to allow plucking the first name + last name at once when making a dropdown */
public function getFullNameAttribute($value)
{
return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name). ' ' . ucfirst($this->number) . ' ' . ucfirst('('.$this->phone.')');
}
}