I am trying to create a index.phtml page to my RESTful Apigility API. Steps i have taken is 1) Create a DB connected API any given it route "account" 2) Access the account API on /account with postman and got HAL and JSON to response to work 3) Create a new "Selector" under content negotiation with 3 view models. "ZF\ContentNegotiation\ViewModel", "ZF\Hal\View\HalJsonModel" and "Zend\View\Model\ViewModel" 4) Selected the newly created selector in the accounts API 5) Created a index.phtml under Account/view/index.phtml with code "
Test
" 6) Added'view_manager' => array(
'template_path_stack' => array(
'account' => __DIR__ . '/../view',
),
),
to module.config.php
7) Using postman and accessed /account with Accept application/json // works Accept text/html // don't work
Would be great if someone could lend a hand to get a index.phtml template to work with a restful DB connect API