Projekt

Obecné

Profil

Stáhnout (1.22 KB) Statistiky
| Větev: | Revize:
1
<?php
2

    
3
/*
4
|--------------------------------------------------------------------------
5
| Application Routes
6
|--------------------------------------------------------------------------
7
|
8
| Here is where you can register all of the routes for an application.
9
| It is a breeze. Simply tell Lumen the URIs it should respond to
10
| and give it the Closure to call when that URI is requested.
11
|
12
*/
13

    
14
$apiUrlRoot='/api/v1/';
15

    
16
/**
17
 * Welcome endpoint.
18
 */
19
$app->get('/', function ()  {
20
    return 'Welcome.';
21
});
22

    
23
/**
24
 * Parametry v url:
25
 * address
26
 * showDirection
27
 */
28
$app->get($apiUrlRoot.'devices', 'DeviceController@getDevice');
29

    
30
//$app->get($apiUrlRoot.'devices/all', 'DeviceController@getAll');
31

    
32
/**
33
 * Parametry v url:
34
 * dateFrom
35
 * dateTo
36
 * timeFrom
37
 * timeTo
38
 * direction
39
 */
40
$app->get($apiUrlRoot.'devices/{id}', 'DeviceController@getDeviceById');
41

    
42
/**
43
 * Vrati vsechny typy aut.
44
 */
45
$app->get($apiUrlRoot.'vehicles', 'VehicleController@getAll');
46

    
47
/**
48
 * Vrati vsechna mesta.
49
 */
50
$app->get($apiUrlRoot.'cities', 'LocationController@getCities');
51

    
52
/**
53
 * Vygeneruje novy JWT s omezenou platnosti.
54
 */
55
$app->get($apiUrlRoot.'token', 'TokenController@generateToken');
56

    
57

    
58

    
59
// testovani
60
$app->get($apiUrlRoot.'header', 'DeviceController@headerTest');
    (1-1/1)