-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.php
More file actions
29 lines (24 loc) · 750 Bytes
/
routes.php
File metadata and controls
29 lines (24 loc) · 750 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
25
26
27
28
29
<?php
use Core\Request;
use Src\Api\User\Infrastructure\UserController;
return [
/**
* Formato para definir rutas
*
* Verbo HTTP => [
* "ruta" => [clase controlador, "metodo del controlador a ejecutar"]
* ]
*
*/
Request::METHOD_GET => [
"user/contacts" => [UserController::class, 'contacts'],
"user/contacts/common" => [UserController::class, 'commonContacts'],
],
Request::METHOD_POST => [
"user/create" => [UserController::class, 'create'],
"user/contacts/create" => [UserController::class, 'createContacts'],
],
Request::METHOD_PUT => [
"user/contacts/update" => [UserController::class, 'updateContacts'],
],
];