blob: f4a33e0f9d3ec641448a216037dc2209f93796e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
<?php /* Copyright (c) 2024 Freya Murphy */
class Home_model extends XSS_Model {
private function get_posts(): ?array {
return $this->db()
->select('*')
->from('api.post')
->limit(POST_PAGE_SIZE)
->rows();
}
public function get_data(): ?array {
$data = parent::get_data();
$data['posts'] = $this->get_posts();
return $data;
}
}
|