update
This commit is contained in:
@@ -52,4 +52,28 @@ class Prescription extends Model
|
||||
'dTanggalResep' => 'datetime',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'nIDUser', 'nID');
|
||||
}
|
||||
|
||||
public function items()
|
||||
{
|
||||
return $this->hasMany(PrescriptionItem::class, 'nIDPrescription', 'nID');
|
||||
}
|
||||
|
||||
public function livechat(){
|
||||
return $this->belongsTo(Livechat::class, 'nIDLivechat', 'nID');
|
||||
}
|
||||
|
||||
public function order()
|
||||
{
|
||||
return $this->hasMany(PrescriptionItem::class, 'nIDPrescription', 'nID');
|
||||
}
|
||||
|
||||
public function payment()
|
||||
{
|
||||
return $this->hasOne(PrescriptionOrder::class, 'nIDPrescription', 'nID');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user