Update LOT API to use nested batch_origin_entries structure
Deploy / deploy (push) Successful in 14s
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:
1 parent
4a98beeb45
commit
7c0fde4fd5
2 files changed
+10
-7
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user