Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
General
Routing problem, please help...
b0o
November 2012
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?
ilNotturno
November 2012
Can you try to access it directly without routing?
Does it works?
b0o
November 2012
ilNotturno
, yes works fine...
b0o
November 2012
FuelPHP version 1.4
b0o
November 2012
trivial misprint ... (: se
r
ment)
Is sad but because of these little things sometimes spend a lot of time ...
ilNotturno
November 2012
:-)
I didn't notice it... My brain read "segment" like yours...
:-)
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
b0o
November 2012
ilNotturno
November 2012