You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to dynamically make the routes from the database with a tree model.
i have an array with all my routes that i need to parse them recursively.
so in my config routes file i have like this.
use RoutesModel as RoutesModel;
$RoutesModel = new RoutesModel();
$DBRoutes = $RoutesModel->findTree();
$module = $DBRoutes[1];
$routes->group($module['url'], ['namespace' => $module['namespace']], function($routes, $DBRoutes)
{
print_r($DBRoutes);die();
});
If you check the second parameter when i group this gives me an error of course it gives an error. Too few arguments to function Config{closure}(), 1 passed in /project/system/Router/RouteCollection.php on line 753 and exactly 2 expected
I've tried to put this DBRoutes into options that i can get inside the grouping method but no luck.
I request for the grouping method to be able to pass multiple variables not just the routes.
The text was updated successfully, but these errors were encountered:
I want to dynamically make the routes from the database with a tree model.
i have an array with all my routes that i need to parse them recursively.
so in my config routes file i have like this.
If you check the second parameter when i group this gives me an error of course it gives an error.
Too few arguments to function Config{closure}(), 1 passed in /project/system/Router/RouteCollection.php on line 753 and exactly 2 expected
I've tried to put this DBRoutes into options that i can get inside the grouping method but no luck.
I request for the grouping method to be able to pass multiple variables not just the routes.
The text was updated successfully, but these errors were encountered: