I was wondering if there's some special trick to loading a file e.g. json and returning its contents from a Rest controller.
i did try:
$json = File::read(APPPATH.'/tmp/response.json', true);
$this->response($json, 200);
also tried
$json = File::read(APPPATH.'/tmp/response.json', true);
$this->response(json_decode($json), 200);
none of this seemed to work.
any ideas?
thanks