We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Call to undefined method get

I followed tutorial 3: Create a simpel REST API, and I just can't understand why Apache registers this error:

Call to undefined method Phalcon\Mvc\Application::get() in C:\wamp\www\followapp\api\v1\public\index.php

This is my code:



$loader = new \Phalcon\Loader();

__DIR__ . '/models/'

$di = new \Phalcon\DI\FactoryDefault();

//Set up the database service
$di->set('db', function(){
return new \Phalcon\Db\Adapter\Pdo\Mysql(array(
    "host" => "localhost",
    "username" => "root",
    "password" => "",
    "dbname" => "followapp"

$app = new Phalcon\Mvc\Micro($di);

//Retrieves all robots
$app->get('/users', function() use ($app) {
$phql = "SELECT * FROM user ORDER BY username";
$users = $app->modelsManager->executeQuery($phql);

$data = array();
foreach ($users as $user) {
    $data[] = array(
        'id' => $user->id,
        'name' => $user->name,

echo json_encode($data);





use Phalcon\Mvc\Model,

class Users extends Model

public function validation()
    //Robot name must be unique
    $this->validate(new Uniqueness(
            "field"   => "username",
            "message" => "The user name must be unique"

    //Check if any messages have been produced
    if ($this->validationHasFailed() == true) {
        return false;



I'm running Phalcon 2.0.0 on Apache 2.2.22 and PHP 5.4.3 with WAMP Server on a Windows 7 machine.

The error says you're using Phalcon\Mvc\Application, can you please check any references to this class?