routes with namespace & filter not work proper |
Code: $routes->get("dashboard", "DashboardController::index", ["namespace" => "\Modules\dashboard\Controllers\Admin"], ["filter" => "auth"]); Code: $routes->get("dashboard", "DashboardController::index", ["filter" => "auth"], ["namespace" => "\Modules\dashboard\Controllers\Admin"]);
Not 100% sure, but as far as I understand the documentation your filter and namespace options should be an array
PHP Code: $routes->get("dashboard", "DashboardController::index", ["namespace" => "\Modules\dashboard\Controllers\Admin","filter" => "auth"]); A good decision is based on knowledge and not on numbers. - Plato
The last parameter to the routes is an $options array this is an associated array to hold all options to the route,
like namespace and filter [namespace => name, filter => your_filter] What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-07-2021, 12:11 AM)salain Wrote: Not 100% sure, but as far as I understand the documentation your filter and namespace options should be an array Now, It's working. Thank You (07-07-2021, 01:59 AM)InsiteFX Wrote: The last parameter to the routes is an $options array this is an associated array to hold all options to the route, Now, It's working. Thank You |
Welcome Guest, Not a member yet? Register Sign In |