update newcoding dlm lelong show

This commit is contained in:
Nur Izzati Zulkifli
2022-10-27 10:10:31 +08:00
parent 486cd4c687
commit 9f662f2fe4
6 changed files with 209 additions and 16 deletions
+9
View File
@@ -30,4 +30,13 @@ class Cawangan extends Model
'para2',
'para3',
];
public function lelongBid()
{
return $this->hasMany(LelongBid::class, 'caw_id', 'caw_id');
}
public function cawangan()
{
return $this->hasOne(Cawangan::class, 'id');
}
}
+10
View File
@@ -51,4 +51,14 @@ class LelongBid extends Model
public function fileMarhunMain() {
return $this->hasOne(FileMarhun::class, 'lelongbidmarhun_id');
}
public function lelongBidMarhun()
{
return $this->hasMany(LelongBidMarhun::class, 'lelongbid_id', 'id');
}
public function statusLelongBidMarhun()
{
return $this->hasMany(LelongBidMarhun::class, 'lelongbid_id', 'id')->take(1);
}
}