Welcome Guest, Not a member yet? Register   Sign In
Can Codeigniter hmvc supports multiple controllers from a module?
#1

Hello All. I am new to this forum and new to Codeigniter Hmvc as well.  
I have a question. Can this hmvc supports calling multiple controller functions from single controllers folder. For example I have modules folder . Under modules I have controllers folder and views folder. In controllers folder I have created two controller functions. 

PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

/**
* HODController
*/
class Hod extends MY_Controller
{
    public function 
__construct()
    {
        
parent::__construct();
        
    }
    public function 
index()
    {
         
$this->load->view('welcome');
    }
    public function 
sayHi()
    {
        
$this->load->view('sayhi');
    }




PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

/**
* HOD1Controller
*/
class Hod1 extends MY_Controller
{
    public function 
__construct()
    {
        
parent::__construct();
        
    }
    public function 
index()
    {
        
$this->load->view('welcome');
    }

    public function 
sayhi()
    {
        
$this->load->view('sayhi');
    }


http://localhost/adeptra_hmvc/index.php/hod/sayhi - this is working
http://localhost/adeptra_hmvc/index.php/hod1/saybye - this says 404 - page not found error. So is it possible to work with calling multiple controllers from a module in hmvc?
Thanks ,
Ajay K.
Reply


Messages In This Thread
Can Codeigniter hmvc supports multiple controllers from a module? - by ajayk - 02-12-2019, 08:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB