35 lines
1014 B
PHP
35 lines
1014 B
PHP
<?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,
|
|
'primary_color' => $this->primary_color,
|
|
'secondary_color' => $this->secondary_color,
|
|
'danger_color' => $this->danger_color,
|
|
'success_color' => $this->success_color,
|
|
'header_bg_color' => $this->header_bg_color,
|
|
'footer_bg_color' => $this->footer_bg_color,
|
|
// 1 day
|
|
'header_logo' => $this->headerLogo?->getTemporaryUrl(1440),
|
|
'footer_logo' => $this->footerLogo?->getTemporaryUrl(1440 ),
|
|
];
|
|
}
|
|
}
|