@php // Filament'in getRecord() metodunu kullanarak kaydı alalım $livewireRecord = null; // Livewire bileşeninden kaydı almayı deneyelim try { if (isset($this) && method_exists($this, 'getRecord')) { $livewireRecord = $this->getRecord(); \Illuminate\Support\Facades\Log::info("Livewire record ID: " . ($livewireRecord->id ?? 'Not found')); } } catch (\Exception $e) { \Illuminate\Support\Facades\Log::error("Error getting Livewire record: " . $e->getMessage()); } // Önce $record değişkenini kontrol edelim, yoksa Livewire kaydını kullanalım $actualRecord = $record ?? $livewireRecord; \Illuminate\Support\Facades\Log::info("Actual record ID: " . ($actualRecord->id ?? 'Not available')); // Post ID'sine özel oturum anahtarını oluşturalım $sessionKey = $actualRecord && $actualRecord->id ? 'content_analysis_data_' . $actualRecord->id : null; // Her zaman taze veri kullanalım, oturum verilerini temizleyelim if ($sessionKey) { // Önce oturum verilerini temizleyelim session()->forget($sessionKey); // Sonra oturum verilerini kontrol edelim if (session()->has($sessionKey)) { $analysisData = session($sessionKey); \Illuminate\Support\Facades\Log::info("Using analysis data from session for post ID {$actualRecord->id}: " . json_encode([ 'links_total' => $analysisData['links']['total'], 'images_total' => $analysisData['images']['total'] ])); } else { // Sayfa ilk açıldığında analiz yapmıyoruz, sadece boş veri yapısı oluşturuyoruz $analysisData = [ 'links' => [ 'total' => 0, 'internal' => 0, 'external' => 0, 'broken' => 0, 'broken_links' => [], ], 'images' => [ 'total' => 0, 'missing_alt' => 0, 'missing_alt_images' => [], ], 'analyzed_at' => now()->format('d.m.Y H:i'), ]; \Illuminate\Support\Facades\Log::info("Created fresh analysis data structure for post ID {$actualRecord->id}"); } } else { // Sayfa ilk açıldığında analiz yapmıyoruz, sadece boş veri yapısı oluşturuyoruz $analysisData = [ 'links' => [ 'total' => 0, 'internal' => 0, 'external' => 0, 'broken' => 0, 'broken_links' => [], ], 'images' => [ 'total' => 0, 'missing_alt' => 0, 'missing_alt_images' => [], ], 'analyzed_at' => now()->format('d.m.Y H:i'), ]; \Illuminate\Support\Facades\Log::info("No session key available, using empty analysis data"); } // Mevcut post ID'sini JavaScript için hazırlayalım $currentPostId = $actualRecord ? $actualRecord->id : null; @endphp

Content Analysis

Last analysis:

Link Analysis

Total
Internal
External

Image Analysis

Total Images
Missing Alt