Implement Product management features with controller, requests, resource, and routes

This commit is contained in:
2026-06-24 10:05:26 -03:00
parent 3c6469617b
commit 8feaa0051d
13 changed files with 20 additions and 20 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Domains\Catalog\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* @mixin \App\Domains\Catalog\Models\Product
*/
class ProductResource extends JsonResource
{
/**
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'tenant_codigo' => $this->tenant_codigo,
'categoria_id' => $this->categoria_id,
'slug' => $this->slug,
'nombre' => $this->nombre,
'descripcion' => $this->descripcion,
'precio' => $this->precio,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}