function startElement($parser, $tagName, $attrs) { switch ($tagName) { case "HOP": $hop = new Hop(); $hop->parse($parser, $this); $this->hops[] = $hop; break; default: break; } }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $data = Hop::all(); return response()->json(json_encode($data)); }