Answer the question
In order to leave comments, you need to log in
Is it possible to use queries in Phalcon ORM like in Eloquent?
Hello. The question is generally simple.
Is it possible to use queries like Eloquent in Phalcon ORM like:
$category = Category::findFirst($id);
$tags = $category->articles()->tags;
Answer the question
In order to leave comments, you need to log in
I guess you mean
$product = Products::findFirst($id);
$tags = $product->tags;
//или
$tags = $product->getTags();
// можно
$tags = $product->getTags('id != 1');
// и даже так
$tags = $this->modelsManager->executeQuery(
"SELECT t.* FROM \Models\Products p
LEFT JOIN \Models\Tags t ON t.postId = p.id ");
I have never seen or used a falcon, but maybe there is an answer in the docks? https://docs.phalconphp.com/en/3.0.0/reference/mod...
Is it possible to use queries in Phalcon ORM like in Eloquent?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question