Welcome Guest, Not a member yet? Register   Sign In
Use of subfolder for controllers when using presenter or resources routes
#2

(This post was last modified: 08-05-2022, 05:37 PM by kenjis.)

You can check your routes with spark routes command:
Code:
$ php spark routes

(08-04-2022, 05:42 PM)gfgrisales Wrote: Is this the intended behaviour or is it a bug to be reported?

I think it is the intended behavior. There is no relation with a route and a controller sub-directory.

$routes->group('dashboard', ...) just adds dashboard in the route.
It does not change the Controller of the presenter.

If you want to change the controller, you need to specify the namespace.

PHP Code:
$routes->group('dashboard', ['namespace' => 'App\Controllers\dashboard'], static function ($routes) {
    $routes->presenter('movie');
    $routes->presenter('category', ['except' => ['show']]);
}); 
Reply


Messages In This Thread
RE: Use of subfolder for controllers when using presenter or resources routes - by kenjis - 08-05-2022, 05:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB