add more controller
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Parents;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class ParentAttendanceReportResource extends JsonResource
|
||||
{
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'id' => (int) ($this['id'] ?? 0),
|
||||
'parent_id' => (int) ($this['parent_id'] ?? 0),
|
||||
'student_id' => (int) ($this['student_id'] ?? 0),
|
||||
'class_section_id' => $this['class_section_id'] ?? null,
|
||||
'report_date' => (string) ($this['report_date'] ?? ''),
|
||||
'type' => (string) ($this['type'] ?? ''),
|
||||
'arrival_time' => $this['arrival_time'] ?? null,
|
||||
'dismiss_time' => $this['dismiss_time'] ?? null,
|
||||
'reason' => $this['reason'] ?? null,
|
||||
'semester' => $this['semester'] ?? null,
|
||||
'school_year' => $this['school_year'] ?? null,
|
||||
'status' => $this['status'] ?? null,
|
||||
'firstname' => $this['firstname'] ?? null,
|
||||
'lastname' => $this['lastname'] ?? null,
|
||||
'class_section_name' => $this['class_section_name'] ?? null,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user