Files
alrahma_sunday_school_api/app/Http/Resources/Inventory/SupplierResource.php
T
2026-03-10 18:21:08 -04:00

21 lines
523 B
PHP

<?php
namespace App\Http\Resources\Inventory;
use Illuminate\Http\Resources\Json\JsonResource;
class SupplierResource extends JsonResource
{
public function toArray($request): array
{
return [
'id' => (int) ($this['id'] ?? 0),
'name' => (string) ($this['name'] ?? ''),
'email' => $this['email'] ?? null,
'phone' => $this['phone'] ?? null,
'address' => $this['address'] ?? null,
'notes' => $this['notes'] ?? null,
];
}
}