'Menunggu Konfirmasi', // 1 => 'Diterima', // 2 => 'Ditolak', // 3 => 'Selesai', // 4 => 'Expired', // ]; const CREATED_AT = 'dCreateOn'; const UPDATED_AT = 'dUpdateOn'; const DELETED_AT = 'dDeleteOn'; protected $connection = 'oldlms'; protected $table = 'tx_prescriptions'; protected $primaryKey = 'nID'; // protected $appends = [ // 'status_name', // ]; protected $casts = [ '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'); } }