22 lines
602 B
PHP
22 lines
602 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources\Teachers;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class TeacherAbsenceResource extends JsonResource
|
|
{
|
|
public function toArray($request): array
|
|
{
|
|
return [
|
|
'id' => (int) ($this['id'] ?? 0),
|
|
'user_id' => (int) ($this['user_id'] ?? 0),
|
|
'date' => (string) ($this['date'] ?? ''),
|
|
'semester' => $this['semester'] ?? null,
|
|
'school_year' => $this['school_year'] ?? null,
|
|
'status' => $this['status'] ?? null,
|
|
'reason' => $this['reason'] ?? null,
|
|
];
|
|
}
|
|
}
|