From d12d0483c78cb8b172f26b028ebc613b4abf10e3 Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Sat, 12 Oct 2019 22:44:35 -0500 Subject: [PATCH] dashboard --- .../Dashboard/DashboardController.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Dashboard/DashboardController.php b/app/Http/Controllers/Dashboard/DashboardController.php index 2f859b5..d3f8bef 100644 --- a/app/Http/Controllers/Dashboard/DashboardController.php +++ b/app/Http/Controllers/Dashboard/DashboardController.php @@ -34,9 +34,21 @@ class DashboardController extends Controller $startStation = $lookupHelper->GetStationDetails($con->start_location_id); $endStation = $lookupHelper->GetStationDetails($con->end_location_id); - $startSystem = $lookupHelper->GetSolarSystemName($startStation->system_id); - $endSystem = $lookupHelper->GetSolarSystemName($endStation->system_id); + dd($endStation); + if(isset($startStation->system_id)) { + $startSystem = $lookupHelper->GetSolarSystemName($startStation->system_id); + } else { + $startSystem = 'N/A'; + } + + if(isset($endStation->system_id)) { + $endSystem = $lookupHelper->GetSolarSystemName($endStation->system_id); + } else { + $endStation = 'N/A'; + } + + //Compile the final array $final = [ 'pickup' => $startSystem, 'destination' => $endSystem,