feat: sinkronisasi foto siswa dari kesiswaan (photo_url PAS FOTO) + API wali return URL absolut
This commit is contained in:
@@ -221,7 +221,9 @@ class ParentAuthController extends Controller
|
||||
'class_name' => $student->class_name,
|
||||
'class_level' => $student->class_level,
|
||||
'department_name' => $student->department_name,
|
||||
'photo_url' => $student->photo_path ? url($student->photo_path) : null,
|
||||
'photo_url' => $student->photo_path
|
||||
? (str_starts_with($student->photo_path, 'http') ? $student->photo_path : url($student->photo_path))
|
||||
: null,
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ class StudentSyncService
|
||||
'department_name' => $item['department_name'] ?? '',
|
||||
'academic_year_name' => $item['academic_year_name'] ?? '',
|
||||
'status' => 'active',
|
||||
'photo_path' => $item['photo_path'],
|
||||
'photo_path' => $item['photo_url'] ?? $item['photo_path'],
|
||||
'class_id' => $class->id,
|
||||
'is_active' => true,
|
||||
'synced_at' => now(),
|
||||
|
||||
Reference in New Issue
Block a user