Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Routing problem, please help...
  • config/roures.php

        'admin'                     => 'shell/admin',
        'admin/(:serment)'          => '$1/admin',
        'admin/(:serment)/(:any)'   => '$1/admin/$2',

    Modules Folder

    modules
    --page
    ----classes
    ------controller
    --------admin.php
    --shell
    ----classes
    ------controller
    --------admin.php


    In /modules/page/classes/controller/admin.php


    namespace Page;

    use \Shell;
    use \Auth\Auth;
    use \Fuel\Core;

    Class Controller_Admin extends Shell\Controller_Admin
    {

        public function action_index()
        {
            return Core\View::forge('backend/index');
        }

        public function action_create()
        {
            return Core\View::forge('backend/create');
        }

    }

    In /modules/shell/classes/controller/admin.php

    namespace Shell;

    use \Fuel\Core;

    Class Controller_Admin extends Controller_Shell
    {

        protected $auth;

        public function before()
        {
            parent::before();
            $this->auth      = Auth::instance();
            $this->container = 'shell::backend/common/container';
            $this->header    = 'shell::backend/common/header';
            $this->footer    = 'shell::backend/common/footer';
        }

        public function action_index()
        {
            return Core\View::forge('backend/index');
        }

    }

    When i try to open /admin/page/create fuel throws 404
    But /admin and /admin/page works fine... Why?
  • Can you try to access it directly without routing? 
    Does it works?
  • ilNotturno, yes works fine...
  • FuelPHP version 1.4
  • trivial misprint ... (: serment)
    Is sad but because of these little things sometimes spend a lot of time ...
  • :-)
    I didn't notice it... My brain read "segment" like yours... :-)

Howdy, Stranger!

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

In this Discussion