Hello!
I am trying to use routes with undersore as I am migrating an app on cake2 to cake4. I have a plugin called OwNfe with a NfeAnaliticos controller.
The content of plugins/OwNfe/config/routes.php file is:
Router::plugin(
'OwNfe',
['path' => '/ow_nfe'],
function ($routes) {
$routes->setRouteClass(InflectedRoute::class);
$routes->scope('/', function (RouteBuilder $builder) {
$builder->fallbacks();
});
}
);
But when i do $this->Html->link(__(‘New Nfe Analitico’), [‘action’ => ‘add’]); i expect the url ‘/ow_nfe/nfe_analiticos/add’ but cakephp give me ‘/ow-nfe/nfe_analiticos/add’.
What am I doing wrong? You would need the plugin to be undersore as well as the controller.
Thanks!