After this pagination Phalcon auto pagination with jquery find out that query is not rendering its sorting order. and in my controller i try like
[Controller]
$bloger = Blogs::find(["order" => "datetime DESC"]);
$numberPage = $this->request->getQuery('page', 'int', 1);
$paginator = new paginator ([
'data' => $bloger,
'limit' => 2,
"order" => "datetime DESC",
'page' => $numberPage
]);
But its not following sorting order not asc, not desc, or not random. if i remove order line then its render just ascending order. how to solve? plz
Array output :
11 | 2016-07-31 21:12:40
3 | 2016-07-31 01:03:49
1 | 2016-07-31 01:03:30
10 | 2016-07-28 11:07:35
9 | 2016-07-28 02:41:47
6 | 2016-07-26 00:41:11
7 | 2016-07-11 23:25:19
2 | 2016-05-17 23:10:17
8 | 2016-04-16 23:47:26
5 | 2016-04-15 23:18:05
4 | 2016-04-15 23:16:31