<?php

namespace App\Models;

use CodeIgniter\Model;

class Md_cms extends Model {
    
    public $db;

    public function __construct() {
        parent::__construct();
        $this->db = \Config\Database::connect();
        
    }

 public function CmsDataInstruction() {

        $notifications = $this->db
                ->table('instruction')
                ->where('status', 1)
                ->limit(1)
                ->get()
                ->getRow();
        return $notifications;
    }
    
  public function CmsData($table,$cms_key) {

        $notifications = $this->db
                ->table($table)
                ->where('cms_status', 1)
                 ->where('cms_key',$cms_key)
                ->limit(1)
                ->get()
                ->getRow();
        return $notifications;
    }
    

}
