Add contact_name, contact_email, phone, website columns. Wire the new fields through the Organisation model, update request validation, response resource, and the TypeScript Organisation interface. Needed by the upcoming dashboard + form-builder binding registry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Resources\Api\V1;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
final class OrganisationResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'name' => $this->name,
|
|
'slug' => $this->slug,
|
|
'contact_name' => $this->contact_name,
|
|
'contact_email' => $this->contact_email,
|
|
'phone' => $this->phone,
|
|
'website' => $this->website,
|
|
'billing_status' => $this->billing_status,
|
|
'settings' => $this->settings,
|
|
'email_logo_url' => $this->email_logo_url,
|
|
'email_primary_color' => $this->email_primary_color,
|
|
'email_reply_to' => $this->email_reply_to,
|
|
'email_sender_name' => $this->email_sender_name,
|
|
'email_footer_text' => $this->email_footer_text,
|
|
'created_at' => $this->created_at->toIso8601String(),
|
|
'updated_at' => $this->updated_at->toIso8601String(),
|
|
];
|
|
}
|
|
}
|