I was busy making a plugin and got confused about the router and prefix system. And the consistency of using uppercase and lowercase to reach the actual paths.
<?php
use Cake\Routing\Route\DashedRoute;
$routes->plugin(
'Myplugin',
['path' => '/Myplugin'],
function ($routes) {
$routes->setRouteClass(DashedRoute::class);
}
);
$routes->prefix('Admin', function ($routes) {
$routes->plugin(
'Myplugin',
['path' => '/Myplugin'],
function ($routes) {
$routes->fallbacks('InflectedRoute');
});
});
when go to url http://localhost/Myplugin/somecontroller It show error missing need to use http://localhost/myplugin/somecontroller can reach
when go to url http://localhost/admin/myplugin/somecontroller can not reach, need to use http://localhost/admin/Myplugin/somecontroller
Is this the difference between fallbacks Inflicted route and dashedroutes that the case sensitive is different?