Added hasMany relation on model files and Updated report filter functionality (and plant order by code) on resource file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s

This commit is contained in:
dhanabalan
2026-02-26 22:11:36 +05:30
parent 6ff1718ca2
commit 17fcaf8b20
3 changed files with 18 additions and 5 deletions

View File

@@ -791,7 +791,7 @@ class ProcessOrderResource extends Resource
} else {
return Plant::whereHas('processOrders', function ($query) {
$query->whereNotNull('id');
})->pluck('name', 'id');
})->orderBy('code')->pluck('name', 'id');
}
// return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();