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

class notification  extends CI_Controller {

	public $userInfo;

    public function __construct()
    {
        parent::__construct();
        	$this->load->library("hajanasms");
		$this->user_model->check_login("home");
		$this->load->model("voucher_model");
		$this->load->model("api_model");
		$this->userInfo = $this->user_model->userInfo("first_name,last_name");
    }
       
       public function noti()
	{
	   
	   $result = $this->db->query("SELECT * FROM student WHERE id= '3' AND is_delete = 0")->result_array();
	//  var_dump($result);
	  // die();
$tokens = array();
foreach ($result as $row)
               {
                  $tokens[] = $row['token'];
                }
                
               // var_dump($tokens);
                //die();

$message = array("message" => "Softvilla  ");

         
	   
	 var_dump($this->api_model->send_notification($tokens,$message));
	 die();
	   
	   
	}



    
    
    
    
    }
