Last active
January 15, 2020 12:24
-
-
Save cwicaksono/9ae3725153dde2031b89324f8c5b7317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Welcome extends CI_Controller { | |
function __construct() { | |
parent::__construct(); | |
$this->load->model('blogpost_model'); | |
$this->load->model('categories_model'); | |
} | |
public function index() | |
{ | |
$data = array( | |
'posts' => $this->blogpost_model->getHome(), | |
'categories' => $this->categories_model->getAll() | |
); | |
$this->load->view('blog', $data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment