githubtrue/backend/app/Http/Controllers/VehicleController.php @ a139ba77
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* Created by PhpStorm.
|
4 |
* User: Zdenda
|
5 |
* Date: 20.4.2018
|
6 |
* Time: 20:25
|
7 |
*/
|
8 |
|
9 |
namespace App\Http\Controllers; |
10 |
|
11 |
|
12 |
use App\Model\Vehicle; |
13 |
use App\Model\Vozidlo; |
14 |
|
15 |
class VehicleController extends Controller |
16 |
{
|
17 |
/**
|
18 |
* Vrati vsechny typy vozidel.
|
19 |
*/
|
20 |
public function getAll() { |
21 |
$vehicles = Vozidlo::all(); |
22 |
|
23 |
if ($vehicles == null || count($vehicles) == 0) { |
24 |
return response('Not found.', 404); |
25 |
}
|
26 |
|
27 |
return $vehicles; |
28 |
}
|
29 |
}
|
- « Předchozí
- 1
- …
- 4
- 5
- 6
- Další »