<?php 

class Contact_us extends MY_FrontendController{
    public function __construct(){
        parent::__construct();
    }

    public function index(){
        $data = [
            'required_css'=>true,
            'css_file'=>'public/static/front/css/contact_us.css',
            'nav_active' =>'contact_us',
            'use_banner' => false,
            'use_breadcrumb' => true
        ];
        $breadcrumb['main'] = [
            'name' => "聯絡我們"
        ];
        $data = array_merge($data,$breadcrumb);

        $this->view('front/contact_us',$data);
    }

    public function add(){
        $this->load->model("Customer_contact_Model");
        $request = $this->input->post();
       
        $this->Customer_contact_Model->add($request);
        redirect('contact_us');
    }

    
}