public function sendEmail(Request $request) { $logFile = storage_path('logs/system_activity.log'); $horseId = $request->input('horse_id'); $email = $request->input('email'); file_put_contents($logFile, "[" . date('Y-m-d H:i:s') . "] sendEmail() dipanggil. horse_id={$horseId}, email={$email}" . PHP_EOL, FILE_APPEND); try { // Uji query $horse = Horse::find($horseId); if(!$horse){ file_put_contents($logFile, "[" . date('Y-m-d H:i:s') . "] Horse tidak ditemukan untuk ID {$horseId}" . PHP_EOL, FILE_APPEND); return response()->json(['status' => 'error', 'message' => 'Kuda tidak ditemukan di database.']); } $certificatePath = storage_path('app/certificates/' . $horse->certificate_file); file_put_contents($logFile, "[" . date('Y-m-d H:i:s') . "] Horse ditemukan: " . json_encode($horse->toArray()) . PHP_EOL, FILE_APPEND); SendEmailHorseCertificateJob::dispatch($horse, $email, $certificatePath, 'frontend'); return response()->json(['status' => 'success','message' => 'Permintaan pengiriman sertifikat sedang diproses.']); } catch (\Exception $e) { file_put_contents($logFile, "[" . date('Y-m-d H:i:s') . "] ERROR: {$e->getMessage()}" . PHP_EOL, FILE_APPEND); return response()->json(['status' => 'error','message' => 'Gagal mengirim sertifikat: ' . $e->getMessage()]); } }
Stud Book Indonesia - Detail Kuda
STUD BOOK INDONESIA
STUD BOOK INDONESIA
Cari
Ă—
Previous
Next
Voting Dancer
Trah
Thoroughbred
Tempat Lahir
Jenis Kelamin
Jantan
Tinggi
Life Number/No. Registrasi
8998/RK/TB/04
Negara Kelahiran
Australia
Disiplin
Status
Nomor Mikrocip
Tanggal Lahir
4 Desember 1999
Bahu Kiri/No. Indeks
Rekor
Tipe DNA
Warna
Merah
Bahu Kanan
Jumlah Kemenangan
Silsilah Voting Dancer
Keturunan
Pemilik
Peternak
Pelatih
Catatan
Voting
(AUS) - 1990
Clear Choice (USA) - 1983
-
-
-
-
-
-
Quite (AUS) - 1981
-
-
-
-
-
-
Nina Bonita
(NZ) - 1986
Danzatore (CAN) - 1980
-
-
-
-
-
-
Regular Doll (IRE) - 1982
-
-
-
-
-
-
Tampilkan
10
25
50
100
data per halaman
Cari
Processing...
Kuda
Induk
Trah
Warna
Jenis Kelamin
Tahun Lahir
Rekor
Jumlah Kemenangan
Fauzan Haviz & Budiman Barli
-
-