Please help Im a newbie in micro applications and not find errror in my script.
Look at this code:
use Phalcon\DI\FactoryDefault,
Phalcon\Mvc\Micro,
Phalcon\Mvc\Micro\Collection as MicroCollection,
Phalcon\Events\Manager as EventsManager;
$di = new FactoryDefault();
$config = include __DIR__ . '/../config/config.php';
error_reporting(-1);
ini_set('display_errors', TRUE);
include __DIR__ . '/../controllers/GeoPointsController.php';
$app = new Micro();
$app->setDI($di);
/*API*/
$apiHandler = new MicroCollection();
$apiHandler->setHandler('GeoPointsController', TRUE);
$apiHandler->setPrefix('/geo');
$apiHandler->get('/', 'index');
$app->mount($apiHandler);
$app->notFound(function () use ($app) {
$app->response->setStatusCode(404, "Not Found")->sendHeaders();
echo 'This is crazy, but this page was not found!';
});
$app->handle();
when I /geo and /geo it shows
This is crazy, but this page was not found!