From 1e89f82802eb3a2f526307058539146054bca807 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sun, 20 Oct 2019 18:41:55 -0500 Subject: [PATCH] lookup helper --- app/Http/Controllers/Dashboard/DashboardController.php | 2 -- app/Library/Lookups/LookupHelper.php | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Dashboard/DashboardController.php b/app/Http/Controllers/Dashboard/DashboardController.php index 0b24a53..563ca53 100644 --- a/app/Http/Controllers/Dashboard/DashboardController.php +++ b/app/Http/Controllers/Dashboard/DashboardController.php @@ -43,8 +43,6 @@ class DashboardController extends Controller //Find start and end station. Need to work on how to tell citadels later. $startStation = $lookupHelper->GetStationDetails($con->start_location_id); $endStation = $lookupHelper->GetStationDetails($con->end_location_id); - - dd($endStation); if(isset($startStation->system_id)) { $startSystem = $lookupHelper->GetSolarSystemName($startStation->system_id); diff --git a/app/Library/Lookups/LookupHelper.php b/app/Library/Lookups/LookupHelper.php index 4a400f7..4fc5d6e 100644 --- a/app/Library/Lookups/LookupHelper.php +++ b/app/Library/Lookups/LookupHelper.php @@ -740,7 +740,7 @@ class LookupHelper { $count = StationLookup::where(['station_id' => $id])->count(); if($count > 0) { - $station = StationLookup::where(['station_id' => $id])->get(); + $station = StationLookup::where(['station_id' => $id])->first(); } else { return null; } @@ -749,7 +749,7 @@ class LookupHelper { $count = StationLookup::where(['name' => $name])->count(); if($coutn > 0) { - $station = StationLookup::where(['name' => $name])->get(); + $station = StationLookup::where(['name' => $name])->first(); } else { return null; }