I am an uber-noob but I've managed to get Phalcon and accompnaying PHP services setup and running.
Based on the demo, I am confused of what info goes where in the file structure. It seems the Index.php sets up the basic structure for a call:
<?php
$app = new \Phalcon\Mvc\Micro();
//define the routes here
//Retrieves all sites
$app->get('/api/sites', function() {
});
$app->handle();
?>
With this code I can get a correct response (HTTP/1.1 200 OK) if I run "curl -i -X GET https://localhost/my-rest-api/api/sites" but I get no actual results.
In a model I setup all the database connections needed to actually search my DB for sites (instead of robots) but how do I get the index.php to call my model?
Do I place all the DB info and actual code in the index.php? Or is that used to setup the framework? Is there an example index.php from the tutorial I can look at?
I am sorry I am so clueless but I will take any suggestions or answer any questions you need. Thank you for your time!