public function getDevice() { $nodoObj = Nodes::select('Caption')->where('NodeId', '=', intval(Input::get('nodeId')))->first(); $deviceObj = Equipos::with('Fabricante')->with('Ubicacion')->with('Tipo')->where('name', '=', $nodoObj->Caption)->first(); $datos = json_encode($deviceObj->toArray()); return $datos; }
public function getEquipo() { $device = Input::get('id'); $deviceObj = Equipos::with('Fabricante')->with('Ubicacion')->with('Tipo')->find($device); return $deviceObj; }