hi all, I just learned phalcon, I'm trying to use query builder and get the following error message: Fatal error: Uncaught Error: Using $this when not in object context in D:\wamp\www\erp\app\models\WorkStaffsModel.php on line 10 . and code here:
<?php
use Phalcon\Mvc\Model\Query\Builder;
class WorkStaffsModel {
public static function getAll()
{
$result = $this->modelsManager->createBuilder()
->from('work_staffs')
->getQuery()
->execute();
return $result;
}
}
how to config query builder