where : inside routes\web.php
solution : just add this comment on top that code or top of file after <?php
<?php
/** @var \Laravel\Lumen\Routing\Router $router */
$router->get('/', function () use ($router) {
return $router->app->version();
});
... other route code