I'm new for laravel I tried some eloquent collections but not get required result help me to solve. I have data like this TABLE NAME (attendance):
id | name |student_id | date_of_attendance | attendance |
1 | john | STD_01 | 2024-01-01 | P |
2 | john | STD_01 | 2024-01-02 | P |
3 | sean | STD_02 | 2024-01-01 | P |
4 | sean | STD_02 | 2024-01-02 | A |
How to merge it to become like this? I want to show only one rows of each student in the views.
livewire controller code
$this->StudenAttendance = Attendance::get();
