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

class Carousel extends CI_Controller
{
	public function get_carouselitems()
	{
		$this->load->model('Carousel_model');
		$productArray = [];
		$headers = $this->input->request_headers();
			if (is_null($this->Carousel_model->get_all_carouselitems()))
				$productArray = ['code' => '99', 'message' => 'No Items available!', 'data' => ''];
			else {
				$productArray = ['code' => '00', 'message' => 'All Items Retrieved', 'data' => $this->Carousel_model->get_all_carouselitems()];
			}
		header('Content-Type: application/json');
		echo json_encode($productArray);
	}

}
