Have such relationship in Phalcon, I need this query ordered by log_time DESC
$this->hasMany('id', 'LogDevices', 'tk_fk', [ 'alias' => 'logs', 'order' => 'log_time DESC' ]);
What right param I need to pass? Thank you
Since Phalcon 2, it is supported:
$this->hasMany('id', 'LogDevices', 'tk_fk', [
'alias' => 'logs',
'params' => [
'order' => 'log_time DESC'
]
]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With