Hi.
I am trying to understand the PHQL documentation a bit better but its confuse me.
Under "Creating PHQL Queries" do you see 1 example where it uses Query() in the model so it would be something like
<?php
class Foo extends \Phalcon\Mvc\Model {
public function foo2() {
$query = new Phalcon\Mvc\Model\Query("SELECT * FROM Cars", $this->getDI());
// Execute the query returning a result if any
$cars = $query->execute();
return $cars;
But then from the rest of the document does it use modelsManager there is based of using queries inside the controller. Isn't it the point with MVC to run all queries from a Model, pass it to the controller and then to the View ?
Or what am i missing here?