mkA~(@^_^@)~PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT p0 1, 'branch_id' => 1, 'qty' => 10, 'specs' => [1, 2] // Specify related spec IDs here ], [ 'product_id' => 2, 'branch_id' => 1, 'qty' => 5, 'specs' => [3, 4] // Specify related spec IDs here ], ]; // Loop through each RFQ foreach ($rfqs as $rfqData) { // Extract specs and remove from data $specs = $rfqData['specs']; unset($rfqData['specs']); // Create the RFQ $rfq = RFQ::create($rfqData); // Attach specs to the RFQ using the belongsToMany relationship $rfq->specs()->attach($specs); } } }