mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-23 03:50:56 +08:00
41 lines
773 B
PHP
41 lines
773 B
PHP
<?php
|
|
|
|
namespace App\Http\Html5\Controllers;
|
|
|
|
/**
|
|
* @RoutePrefix("/mobile")
|
|
*/
|
|
class IndexController extends Controller
|
|
{
|
|
|
|
/**
|
|
* @Get("/", name="mobile.index")
|
|
*/
|
|
public function indexAction()
|
|
{
|
|
|
|
}
|
|
|
|
/**
|
|
* @Get("/routes", name="mobile.routes")
|
|
*/
|
|
public function routesAction()
|
|
{
|
|
$definitions = [];
|
|
|
|
$routes = $this->router->getRoutes();
|
|
|
|
foreach ($routes as $route) {
|
|
if (strpos($route->getPattern(), '/api') !== false) {
|
|
$definitions[] = [
|
|
'pattern' => $route->getPattern(),
|
|
'methods' => $route->getHttpMethods(),
|
|
];
|
|
}
|
|
}
|
|
|
|
return $this->jsonSuccess(['routes' => $definitions]);
|
|
}
|
|
|
|
}
|