<?php
class DashboardController extends Controller {
    public function index() {
        $galleryModel = $this->model('Gallery');
        $productModel = $this->model('Product');
        $categoryModel = $this->model('Category'); 
        $testimonialModel = $this->model('Testimonial');
        $totalImage = $galleryModel->countAllGallery();
        // $totalProduct = $productModel->countAllProduct();
        // $totalCategory = $categoryModel->countAllCategory();
        $totalTestimonials = $testimonialModel->countAllTestimonial();
        $data['title'] = "Admin Dashboard";
        $this->view('templates/header', $data);
        $this->view('dashboard');

        // $this->view('dashboard',['totalImage'=>$totalImage, 'totalProduct'=>$totalProduct,'totalCategory'=>$totalCategory,'totalTestimonials' => $totalTestimonials]);
        $this->view('templates/footer', $data);
    }
}
