Update LOT API to use nested batch_origin_entries structure
Deploy / deploy (push) Successful in 14s

Each spice now returns an `origins` array (was single `origin` object) with
supplier and farmer resolved from the new entries relation, not flat columns.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Malek TellissiandClaude Sonnet 4.6 committed 2026-09-12 20:07:53 +02:00
1 parent 4a98beeb45
commit 7c0fde4fd5
2 files changed
+10 -7

No files matched your search

+2 -1
View File
@@ -16,7 +16,8 @@ class LotController extends Controller
'size.packing',
'recipe.spices',
'origins.spice',
'origins.supplier',
'origins.entries.supplier',
'origins.entries.farmer',
])->where('lot_number', $lotNumber)->first();
if (! $batch) {