Projekt

Obecné

Profil

Stáhnout (484 Bajtů) Statistiky
| Větev: | Revize:
1 cb15593b Cajova-Houba
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Zdenda
5
 * Date: 16.4.2018
6
 * Time: 13:19
7
 */
8
9
namespace App\Http\Controllers;
10
11
12
use App\Model\Location;
13 b50f8ebd Cajova-Houba
use App\Model\Mesto;
14 cb15593b Cajova-Houba
15
class LocationController extends Controller
16
{
17 b50f8ebd Cajova-Houba
    /**
18
     * Vrati vsechna mesta.
19
     */
20
    public function getCities() {
21 a139ba77 Cajova-Houba
        $towns = Mesto::with('zarizeni')->get();
22
23
        if ($towns == null || count($towns) == 0) {
24
            return response('Not fonud.', 404);
25
        }
26
27
        return $towns;
28 b50f8ebd Cajova-Houba
    }
29 cb15593b Cajova-Houba
}