xssbook2/web/_controller/apps/home.php

26 lines
545 B
PHP
Raw Normal View History

<?php /* Copyright (c) 2024 Freya Murphy */
2024-03-30 16:14:42 +00:00
class Home_controller extends Controller {
2024-03-30 16:14:42 +00:00
// the home model
private $home_model;
// the post controller
protected $post_controller;
2024-03-30 16:14:42 +00:00
function __construct($load) {
parent::__construct($load);
$this->home_model = $this->load->model('apps/home');
$this->post_controller = $this->load->controller('_util/post');
}
2024-03-30 16:14:42 +00:00
public function index(): void {
parent::index();
2024-03-30 16:14:42 +00:00
$data = $this->home_model->get_data();
$this->view('header', $data);
2024-03-30 16:14:42 +00:00
$this->view('apps/home/main', $data);
}
}
?>