Updated item foreign key on belongsTo

This commit is contained in:
dhanabalan
2025-05-31 17:34:13 +05:30
parent be47d48931
commit 35501f2bec

View File

@@ -52,9 +52,10 @@ class MotorTestingMaster extends Model
public function item(): BelongsTo
{
return $this->belongsTo(Item::class);
return $this->belongsTo(Item::class, 'item_id', 'id');
// return $this->belongsTo(Item::class);
}
public function testingPanelReadings()
{
return $this->hasMany(TestingPanelReading::class, 'motor_testing_master_id');