<?php
defined('BASEPATH') or exit('No direct script access allowed');

class Laporan extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->library('form_validation');
        if (!$this->session->userdata('login')) {
            redirect('auth');
        }
        $this->load->model('penjualan_model');
    }

    public function index()
    {
        $data['penjualan'] = $this->penjualan_model->get_all()->result_array();
        $this->load->view('laporan/index', $data);
    }
}
