feat: sinkronisasi foto siswa dari kesiswaan (photo_url PAS FOTO) + API wali return URL absolut

This commit is contained in:
Novy San87
2026-08-07 08:27:44 +07:00
parent 2b354e9e46
commit 503e910e18
2 changed files with 4 additions and 2 deletions
@@ -221,7 +221,9 @@ class ParentAuthController extends Controller
'class_name' => $student->class_name, 'class_name' => $student->class_name,
'class_level' => $student->class_level, 'class_level' => $student->class_level,
'department_name' => $student->department_name, '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,
], ],
]; ];
+1 -1
View File
@@ -105,7 +105,7 @@ class StudentSyncService
'department_name' => $item['department_name'] ?? '', 'department_name' => $item['department_name'] ?? '',
'academic_year_name' => $item['academic_year_name'] ?? '', 'academic_year_name' => $item['academic_year_name'] ?? '',
'status' => 'active', 'status' => 'active',
'photo_path' => $item['photo_path'], 'photo_path' => $item['photo_url'] ?? $item['photo_path'],
'class_id' => $class->id, 'class_id' => $class->id,
'is_active' => true, 'is_active' => true,
'synced_at' => now(), 'synced_at' => now(),