Revize a139ba77
Přidáno uživatelem Cajova-Houba před asi 7 roky(ů)
backend/app/Http/Controllers/VehicleController.php | ||
---|---|---|
18 | 18 |
* Vrati vsechny typy vozidel. |
19 | 19 |
*/ |
20 | 20 |
public function getAll() { |
21 |
return Vozidlo::all(); |
|
21 |
$vehicles = Vozidlo::all(); |
|
22 |
|
|
23 |
if ($vehicles == null || count($vehicles) == 0) { |
|
24 |
return response('Not found.', 404); |
|
25 |
} |
|
26 |
|
|
27 |
return $vehicles; |
|
22 | 28 |
} |
23 | 29 |
} |
Také k dispozici: Unified diff
refs #6699: Pridany chybove kody k rest api end pointum.