20 lines
358 B
PHP
20 lines
358 B
PHP
|
<?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;
|
||
|
}
|
||
|
}
|
||
|
?>
|