Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Namespaces problem

Hello, I'm a newbie with the powerful Phalcon, I try to make an admins interface but I get this error

Fatal error: Class 'Weblev\Models\Phalcon\Db' not found in /home/weblev/www/app/models/Machines.php on line 74

The line 74 contain

$resultset->setFetchMode(Phalcon\Db::FETCH_OBJ);

The code worked perfectly before I try to do an admin Interface and use a namespace



7.2k
Accepted
answer
$resultset->setFetchMode(\Phalcon\Db::FETCH_OBJ);

http://php.net/manual/en/language.namespaces.fallback.php

I tried this solution but I gess I've messed somewhere, I gonna check.

Thank you