<?php
  class DataVistor extends Controller {
        private Country $countryModel;
        private Page $pageModel;
        private Vistor $vistorModel; // ✅ پہلے declare کریں

        public function __construct(){

  
      $this->pageModel = $this->model('Page');
         $this->countryModel = $this->model('Country');
      
    }
      
      public function loadVistor(){

       $this->vistorModel = $this->model('Vistor');
       $result =  $this->vistorModel->loadData();
   
      echo json_encode($result);
     }
     
     public function blockCountry(){

       $this->countryModel = $this->model('Country');
       $result =  $this->countryModel->loadCountry();
      echo json_encode($result);
     }

     public function  userList()
     {
       $this->userModel = $this->model('User');
      $user = $this->userModel->userList();
      echo json_encode($user);
        
     }
      
  }