From 6071c8b89884e51aed2bffa37db6a7d5b4cfa72e Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 16 Feb 2026 11:48:33 +0530 Subject: [PATCH] Added machine id column in production quantity model file --- app/Models/ProductionQuantity.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Models/ProductionQuantity.php b/app/Models/ProductionQuantity.php index f3eeeb9..c97aef3 100644 --- a/app/Models/ProductionQuantity.php +++ b/app/Models/ProductionQuantity.php @@ -16,6 +16,7 @@ class ProductionQuantity extends Model protected $fillable = [ "plant_id", + "machine_id", "shift_id", "line_id", "item_id", @@ -50,6 +51,11 @@ class ProductionQuantity extends Model return $this->belongsTo(Item::class); } + public function machine(): BelongsTo + { + return $this->belongsTo(Machine::class); + } + protected static function booted() { static::created(function ($productionQuantity) {