Compare commits
2 Commits
04d0c2dc82
...
1dbbd53fc9
| Author | SHA1 | Date | |
|---|---|---|---|
| 1dbbd53fc9 | |||
|
|
bec3e9f8bd |
@@ -620,7 +620,17 @@ class StickerMasterResource extends Resource
|
|||||||
->options(function (callable $get) {
|
->options(function (callable $get) {
|
||||||
$plantId = $get('Plant');
|
$plantId = $get('Plant');
|
||||||
|
|
||||||
return $plantId ? Item::where('plant_id', $plantId)->pluck('code', 'id') : [];
|
if (! $plantId) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return Item::whereHas('stickerMasters', function ($query) use ($plantId) {
|
||||||
|
if ($plantId) {
|
||||||
|
$query->where('plant_id', $plantId);
|
||||||
|
}
|
||||||
|
})->pluck('code', 'id');
|
||||||
|
|
||||||
|
// return $plantId ? Item::where('plant_id', $plantId)->pluck('code', 'id') : [];
|
||||||
})
|
})
|
||||||
->searchable()
|
->searchable()
|
||||||
->reactive(),
|
->reactive(),
|
||||||
|
|||||||
Reference in New Issue
Block a user