feat: Implement staff management features; add controller, service, resource, routes, and tests for staff and category assignments

This commit is contained in:
2026-08-04 16:20:30 -03:00
parent 3a039a6055
commit 2a15dc92be
18 changed files with 618 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
namespace App\Domains\Forms\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class StaffFormResource extends JsonResource
{
/** @return array<string, mixed> */
public function toArray(Request $request): array
{
return [
'categories' => $this->resource['categories']->map(fn ($category) => [
'id' => $category->id,
'nombre' => $category->nombre,
])->values(),
];
}
}