Template
peserta-danuar
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class MsDoctor extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
"name"
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the user that owns the doctor
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function msDoctorHealthService(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(MsDoctorHealthService::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
|
||||
public function trPatientVisit(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(TrPatientVisit::class, 'foreign_key', 'other_key');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user