User can add/edit flights

This commit is contained in:
2026-04-14 20:52:38 +10:00
parent 4110b52ba5
commit 2a657bbbf7
4 changed files with 35 additions and 2 deletions
@@ -30,9 +30,11 @@ class SearchController extends Controller
public function aircraft()
{
$q = request('q', '');
$replacedQuery = str_replace(['A3', 'A2'], ['A-3', 'A-2'], $q);
return Aircraft::where('designator', 'ilike', "%{$q}%")
->orWhereRaw("CONCAT(manufacturer_code, ' ', model_full_name) ilike ?", ["%{$q}%"])
->orWhereRaw("CONCAT(manufacturer_code, ' ', model_full_name) ilike ?", ["%{$replacedQuery}%"])
->limit(200)
->orderBy('id', 'asc')
->get(['id', 'manufacturer_code', 'model_full_name', 'designator'])