<?php
include_once "../../includes/config.php";
include_once "../../includes/database.php";
include_once "../../includes/validation.php";
include_once "../../includes/Helper.php";
include_once "../../includes/ajax/check_session_ajax.php";

include_once "../../includes/auth.php";
$auth = array('chef');
$authRes = checkAuth($auth, $user);
if(!$authRes)
{
    http_response_code(401);
	echo json_encode(array('error_text' => 'Authntication Error'));
	exit;
}

include_once "../../includes/ajax/check_paid_ajax.php";



class getNewChefOrders extends database
{
    public function index($userID)
    {
       return $this->callQueryRow('SELECT COUNT(*) AS count FROM tb_notification WHERE cl_user_id=? AND cl_read=0 AND deleted_at IS NULL', [$userID]);
       
    }
    
}

$obj = new getNewChefOrders();



$items = $obj->index($user['cl_id']);
    
echo json_encode($items);