Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Module routing
  • Im having a bit of trouble getting my head around module routing - i wanted to see whether id got everything correct:
    I have a module called cams
    My app folder arrangement is as follows:
    app/
           modules/
                  cams/
                        classes/
                            controller/
                                  cams.php
                            model/
                            view/
                        config/
                             routes.php
                        lang/
                        views/
    

    i have enabled to module directory in config.php
    'module_paths' => array(
      APPPATH.'modules'.DS,
     ),
    

    the contents of cams.php can be found here: http://pastie.org/1864557 as i understand, requests for cams will be automatically directed to the module.
    my module then has a routes.php to direct the request to the correct controller:
    <?php
    
    return array(
        'cams' => 'cams/index'  
    );
    

    whenever i make a request for my module, i get a 404 error. I guess the crux of my question is, how do you route requests to a module?
  • 'cams/index' routes to the cams module, index controller. which doesn't exist. Try 'cams/cams/index' instead...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion