Routre configure

Router::scope(’/api’, [’_namePrefix’ => ‘api:’], function(RouteBuilder $routes){
$routes->connect(’/ping’, [‘controller’ => ‘Pings’, ‘action’ => ‘show’], [’_name’ => ‘ping’]);

$routes->fallbacks(DashedRoute::class);

});

Controller and method can be found, but can not be displayed properly?

What do you mean it cannot be displayed properly? Please post the errors you are getting