olshop/application/controllers/Welcome.php

36 lines
814 B
PHP
Raw Permalink Normal View History

2020-01-02 23:12:35 +07:00
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
function __Construct()
{
parent ::__construct();
$this->load->model('Barang');
$this->load->model('Kategori');
}
public function index()
{
//$this->load->view('welcome_message');
//ambil data slideshow
//ambil data hot produk
//ambil data new produk
//load view home
// $a = array(
// 'id' => 1
// );
// $d = $this->Barang->caribarang('a');
// echo JSON_ENCODE($d);
$hd['title'] = "Toko Dzaky Mulya";
$ss['active'] = "Home";
$data['kategori'] = $this->Kategori->kategori_all();
$this->load->view('front/header',$hd);
$this->load->view('front/slideshow',$ss);
$this->load->view('front/Home',$data);
$this->load->view('front/footer');
}
}