From ad86e996d7132d1786ca9e6a614b39dc59162b8c Mon Sep 17 00:00:00 2001 From: "B.Fatih KOZ" Date: Thu, 3 Jun 2021 21:41:31 +0300 Subject: [PATCH] Fix Aircraft Dropdown Grouping (#1216) * Update PirepController Frontend : Use `$subfleet->type` instead of `name` for grouping aircraft list. * Update PirepController (Admin) Use `$subfleet->type` instead of `name` here too , for grouping aircraft list according to their subfleets. Co-authored-by: Nabeel S --- app/Http/Controllers/Admin/PirepController.php | 2 +- app/Http/Controllers/Frontend/PirepController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Admin/PirepController.php b/app/Http/Controllers/Admin/PirepController.php index b5cd5347..816024fe 100644 --- a/app/Http/Controllers/Admin/PirepController.php +++ b/app/Http/Controllers/Admin/PirepController.php @@ -100,7 +100,7 @@ class PirepController extends Controller $tmp[$ac->id] = $ac['name'].' - '.$ac['registration']; } - $aircraft[$subfleet->name] = $tmp; + $aircraft[$subfleet->type] = $tmp; } return $aircraft; diff --git a/app/Http/Controllers/Frontend/PirepController.php b/app/Http/Controllers/Frontend/PirepController.php index 3b990394..3759ac05 100644 --- a/app/Http/Controllers/Frontend/PirepController.php +++ b/app/Http/Controllers/Frontend/PirepController.php @@ -103,7 +103,7 @@ class PirepController extends Controller $tmp[$ac->id] = $ac['name'].' - '.$ac['registration']; } - $aircraft[$subfleet->name] = $tmp; + $aircraft[$subfleet->type] = $tmp; } return $aircraft;