Projekt

Obecné

Profil

Stáhnout (1.04 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
$app->get('/', function ()  {
17
    return 'Funguje to.';
18
});
19

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

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

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

    
39
//$app->get($apiUrlRoot.'devices/lastday', 'DeviceController@lastDay');
40

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

    
46
$app->get($apiUrlRoot.'cities', 'LocationController@getCities');
47

    
    (1-1/1)