Falcon relationship order

There is such a relationship in Phalcon, I need this query ordered log_time DESC

      $this->hasMany('id', 'LogDevices', 'tk_fk', [ 'alias' => 'logs', 'order' => 'log_time DESC'  ]);

Which right pair do I need to go through? thank you

+4
source share
1 answer

With Phalcon 2 supported:

$this->hasMany('id', 'LogDevices', 'tk_fk', [ 
    'alias' => 'logs', 
    'params' => [
        'order' => 'log_time DESC'  
    ]
]);
+4
source

Source: https://habr.com/ru/post/1613455/


All Articles