<?php

namespace App\Http\Resources\Parents;

use Illuminate\Http\Resources\Json\JsonResource;

class ParentAttendanceResource extends JsonResource
{
    public function toArray($request): array
    {
        return [
            'firstname' => (string) ($this['firstname'] ?? ''),
            'lastname' => (string) ($this['lastname'] ?? ''),
            'date' => (string) ($this['date'] ?? ''),
            'status' => (string) ($this['status'] ?? ''),
            'reason' => $this['reason'] ?? null,
        ];
    }
}
