Lastly, there is the findFirstBy<property-name>() method. This method expands on the “findFirst()” method mentioned earlier. It allows you to quickly perform a retrieval from a table by using the property name in the method itself and passing it a parameter that contains the data you want to search for in that column.
class Robots extends \Phalcon\Mvc\Model
{
public $id;
public $name;
public $price;
}
We have three properties to work with here. $id, $name and $price. So, let’s say you want to retrieve the first record in the table with the name ‘Terminator’. This could be written like so :
$name = "Terminator";
$robot = Robots::findFirstByName($name);
This is from the doc: https://docs.phalcon.io/en/latest/reference/models.html#finding-records