Any one can help me to handle below error.
An uncaught Exception was encountered
Type: ArgumentCountError
Message: Too few arguments to function Employee::view_profile(), 0 passed in C:\wamp64\www\MY\admin\system\core\CodeIgniter.php on line 532 and exactly 1 expected
Filename: C:\wamp64\www\MY\admin\application\controllers\Employee.php
Line Number: 128
Backtrace:
File: C:\wamp64\www\MY\admin\index.php
Line: 315
Function: require_once
Here this is my function...
public function view_profile($id)
{
if ($this->session->userdata('NAME')) {
$role = $this->session->userdata('ROLE');
if ($role >= 1) {
$employee_data["row"] = $this->Employee_model->view_data($id);
//var_dump($employee_data); die();
if ($employee_data["row"] == null) {
$this->load->view('includes/header');
$this->load->view('includes/top_header');
$this->load->view('includes/left_nav');
$this->load->view('error_page/404');
$this->load->view('includes/footer');
$this->load->view('includes/settings');
} else {
$this->load->view('includes/header');
$this->load->view('includes/top_header');
$this->load->view('includes/left_nav');
$this->load->view('employee/view_employee_profile', $employee_data);
$this->load->view('includes/footer');
$this->load->view('includes/settings');
}
}
}
}