Hi
In my controller I have this :
Code:
$article = new Article();
$data = [
'articles' => $article->paginate(5),
'pager' => $article->pager
];
echo view('panel/template', $data);
Which loads the records from the article table and uses the pagination module to limit the number of records per page in the view file.
The pagination module loads the records in ascending order by default but I need to have them in Descending order which means I need the new articles to be on the first page.
Any idea how to do that?