forked from kvnZero/hyperf-APIJSON
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.php
More file actions
24 lines (20 loc) · 864 Bytes
/
routes.php
File metadata and controls
24 lines (20 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
use Hyperf\HttpServer\Router\Router;
Router::addRoute(['GET', 'POST', 'HEAD', 'PUT', 'DELETE'], '/', 'App\Controller\IndexController@index');
Router::addRoute(['POST'], '/get[/{tag}]', 'App\Controller\IndexController@get');
Router::addRoute(['POST'], '/head[/{tag}]', 'App\Controller\IndexController@head');
Router::addRoute(['POST'], '/post[/{tag}]', 'App\Controller\IndexController@post');
Router::addRoute(['POST'], '/put[/{tag}]', 'App\Controller\IndexController@put');
Router::addRoute(['POST'], '/delete[/{tag}]', 'App\Controller\IndexController@delete');
Router::get('/favicon.ico', function () {
return '';
});