public static function getLocationDetail($id) { $c = Assetlocation::find($id); return $c; }
private function locationName($locationId) { $loc = Assetlocation::find($locationId); if ($loc) { return $loc->name; } else { return ''; } }