public function get() { $route = array('_links' => array("self" => array("href" => $this->rootUrl), "ea:login" => array('href' => $this->rootUrl . '/api/login'), "ea:user" => array('href' => $this->rootUrl . '/api/user/{id}'), "ea:student" => array('href' => $this->rootUrl . '/api/students'))); $json = \q::z()->arrayToJSON($route); return Response::make($json, '200')->header('Content-Type', 'application/hal+json'); }
<textarea rows="10" cols="50"> <?php echo q::z()->arrayToSimpleXml(q::apiRoute()->get(''))->asXML(); ?> </textarea>
<textarea rows="10" cols="50"> <?php echo q::z()->arrayToSimpleXml(q::apiRoute()->get('user', array('login')))->asXML(); ?> </textarea>