Updated item foreign key on belongsTo
This commit is contained in:
@@ -52,9 +52,10 @@ class MotorTestingMaster extends Model
|
|||||||
|
|
||||||
public function item(): BelongsTo
|
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()
|
public function testingPanelReadings()
|
||||||
{
|
{
|
||||||
return $this->hasMany(TestingPanelReading::class, 'motor_testing_master_id');
|
return $this->hasMany(TestingPanelReading::class, 'motor_testing_master_id');
|
||||||
|
|||||||
Reference in New Issue
Block a user