Added qualityValidations hasMany relation
This commit is contained in:
@@ -33,9 +33,9 @@ class StickerMaster extends Model
|
|||||||
'part_validation5',
|
'part_validation5',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function item(): BelongsTo
|
public function item()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Item::class);
|
return $this->belongsTo(Item::class, 'item_id', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function plant(): BelongsTo
|
public function plant(): BelongsTo
|
||||||
@@ -43,4 +43,8 @@ class StickerMaster extends Model
|
|||||||
return $this->belongsTo(Plant::class);
|
return $this->belongsTo(Plant::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function qualityValidations()
|
||||||
|
{
|
||||||
|
return $this->hasMany(QualityValidation::class, 'sticker_master_id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user