fix: StudentController, AdminUserSeeder updates

This commit is contained in:
novysan87
2026-07-25 12:19:13 +07:00
parent c6e21961c4
commit 520c6d3e48
4 changed files with 183 additions and 176 deletions
+6 -1
View File
@@ -699,7 +699,12 @@ class StudentController extends Controller
$path = storage_path('app/private/student-import-example.xlsx');
abort_unless(file_exists($path), 404, 'File contoh import siswa belum tersedia.');
if (! file_exists($path)) {
$response = $this->downloadImportTemplate();
$response->headers->set('Content-Disposition', 'attachment; filename="contoh-import-siswa.xlsx"');
return $response;
}
return response()->file($path, [
'Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',