feat(food): implement FoodFormController and FoodFormService; add FoodFormResource for managing food options and routes

This commit is contained in:
2026-08-10 10:05:35 -03:00
parent ca605127d0
commit 1cd60f7021
9 changed files with 202 additions and 5 deletions

View File

@@ -12,6 +12,14 @@ class FoodResource extends JsonResource
/** @return array<string, mixed> */
public function toArray(Request $request): array
{
if ($this->resource === null) {
return [
'id' => null,
'name' => 'Comida',
'variants' => [],
];
}
return [
'id' => $this->id,
'name' => $this->nombre,