Get URL data using Codeigniter

0
CodeIgniter- scripts.guru
public function url()
{
       $this->load->helper('url');
       $currentURL = current_url();
       $data['params'] = $_SERVER['QUERY_STRING'];

       $fullURL = $currentURL . '?' . $params;
       $category = $data['params'];
}