Projekt

Obecné

Profil

Stáhnout (689 Bajtů) Statistiky
| Větev: | Revize:
1 01189277 kohlicekjan
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Zdenda
5
 * Date: 20.4.2018
6
 * Time: 20:09
7
 */
8
9
namespace App\Http\Controllers;
10
11
use App\Model\Device;
12
use App\Model\Zarizeni;
13
use App\Model\Zaznam;
14
use Illuminate\Http\Request;
15
use phpDocumentor\Reflection\Types\Array_;
16
use phpDocumentor\Reflection\Types\Mixed_;
17
18
class RangeController extends Controller
19
{
20
21
    /**
22
     * Vrati časový rozsah záznamů
23
     *
24
     * @return Zarizeni
25
     */
26
    public function getRange()
27
    {
28
        $rangeDate = Zaznam::lastDateAndFirstDate();
29
30
        if ($rangeDate != null) {
31
            return json_encode($rangeDate);
32
        } else {
33
            return response('Not found.', 404);
34
        }
35
    }
36
37
}