Skip to content

Commit

Permalink
chore(api)! : add email and image in class for teacher
Browse files Browse the repository at this point in the history
  • Loading branch information
ArdianS18 committed Nov 25, 2024
1 parent 3455526 commit 803de75
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Http/Resources/ClassroomStudentResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ public function toArray(Request $request): array
{
return [
'id' => $this->id,
'nik' => $this->student->nik,
'nisn' => $this->student->nisn,
'email' => $this->student->user->email,
'student' => $this->student->user->name,
'gender' => $this->student->gender->label(),
'nisn' => $this->student->nisn,
'nik' => $this->student->nik,
'image' => $this->student->image != null ? asset(request()->root(). '/storage/'.$this->student->image) : asset(request()->root(). '/public/admin_assets/dist/images/profile/user-1.jpg'),
];
}
}

0 comments on commit 803de75

Please sign in to comment.