blob: 44a8549d9d9247a6371a7ec2167d7c1f69f3ae2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<?php /* Copyright (c) 2024 Freya Murphy */
class HomeModel extends Model {
private function get_posts() {
return $this->db
->select('*')
->from('admin.post')
->limit(20)
->rows();
}
public function get_data() {
$data = parent::get_data();
$data['title'] = lang('title');
$data['posts'] = $this->get_posts();
return $data;
}
}
?>
|