1 |
cb15593b
|
Cajova-Houba
|
<?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 |
1123608c
|
Cajova-Houba
|
$apiUrlRoot='/api/v1/';
|
15 |
cb15593b
|
Cajova-Houba
|
|
16 |
1123608c
|
Cajova-Houba
|
$app->get('/', function () {
|
17 |
|
|
return 'Funguje to.';
|
18 |
cb15593b
|
Cajova-Houba
|
});
|
19 |
|
|
|
20 |
1123608c
|
Cajova-Houba
|
/**
|
21 |
|
|
* Parametry v url:
|
22 |
|
|
* address
|
23 |
|
|
* showDirection
|
24 |
|
|
*/
|
25 |
|
|
$app->get($apiUrlRoot.'devices', 'DeviceController@getDevice');
|
26 |
|
|
|
27 |
b50f8ebd
|
Cajova-Houba
|
$app->get($apiUrlRoot.'devices/all', 'DeviceController@getAll');
|
28 |
|
|
|
29 |
1123608c
|
Cajova-Houba
|
/**
|
30 |
|
|
* Parametry v url:
|
31 |
|
|
* dateFrom
|
32 |
|
|
* dateTo
|
33 |
|
|
* timeFrom
|
34 |
|
|
* timeTo
|
35 |
|
|
* direction
|
36 |
|
|
*/
|
37 |
|
|
$app->get($apiUrlRoot.'devices/{id}', 'DeviceController@getDeviceById');
|
38 |
cb15593b
|
Cajova-Houba
|
|
39 |
1123608c
|
Cajova-Houba
|
/**
|
40 |
|
|
* Vrati vsechny typy aut.
|
41 |
|
|
*/
|
42 |
|
|
$app->get($apiUrlRoot.'vehicles', 'VehicleController@getAll');
|
43 |
b50f8ebd
|
Cajova-Houba
|
|
44 |
|
|
$app->get($apiUrlRoot.'cities', 'LocationController@getCities');
|