D
D
Dokuro2015-09-06 22:31:25
PHP
Dokuro, 2015-09-06 22:31:25

Is it possible to call a static model method in the volt template?

Hello. I am using Phalcon PHP framework. It has a Volt template engine.
So, how to call the static method of the model in the template (Messages::counter())
I did not find a solution in the documentation. So far I'm doing it simply: But this construction seems like a crutch to me, is it?
<?php echo Messages::counter() ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KorsaR-ZN, 2015-09-06
Chan @iDokuro

If you need to call a static method, then register it as a function and call it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question