skip to Main Content

Laravel successfully adding item in one to many relationship model but it is not being added to database

please help, I've been stuck here since then. I want to insert shipmentrequestitem from shipmentrequest model using update method public function update(UpdateShipmentRequestRequest $request, $id) { $shipmentRequest = ShipmentRequest::with( 'shipmentRequestItems', )->where('id',$id)->first(); $shipmentRequest->update($request->all()); $validatedData = $request->validated(); $shipmentRequestItems = $validatedData['shipmentRequestItems']; // $shipmentRequest =…

VIEW QUESTION

Some relations returning NULL when using UUID as ID – Laravel Eloquent

Why do some of my voucher relations return null? even though there is a voucher with that ID And some relationships run well as in the picture below This is code for dumping the results dump(AppModelsAffiliatorVoucher::find('27a4093d-2370-4c55-bc44-1f8ef8144067')->toArray()); dd(AppModelsAffiliatorVoucherMember::with('voucher')->find(172)->toArray()); AppModelsAffiliatorVoucher class AffiliatorVoucher…

VIEW QUESTION
Back To Top
Search