Refactor project structure to use domain-oriented architecture; add Product and Tenant domains with controllers, models, requests, resources, and routes

This commit is contained in:
2026-06-19 11:59:28 -03:00
parent 507b81b54e
commit 93a2750d33
31 changed files with 681 additions and 163 deletions

View File

@@ -0,0 +1,27 @@
<?php
namespace App\Domains\Tenant\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* @mixin \App\Domains\Tenant\Models\Tenant
*/
class TenantResource extends JsonResource
{
/**
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'codigo' => $this->codigo,
'nombre' => $this->nombre,
'dominio' => $this->dominio,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}