Implement Dynamic Header and Footer Templates in Blog Controller: Enhanced the BlogController to prioritize page-specific header and footer templates based on the 'blog' page settings. If no specific templates are set, it falls back to the default active templates. Updated the blog index view to include a header template variable for better customization. Additionally, added redirects for legacy index URLs to improve user navigation.

This commit is contained in:
Ümit Tunç
2026-01-06 22:03:05 +03:00
parent 374d4a8d7d
commit c73d448f47
4 changed files with 49 additions and 11 deletions
+4
View File
@@ -7,6 +7,10 @@ use App\Http\Controllers\TemplatePreviewController;
use App\Models\Page;
// Debug Route - Veritabanı kontrolü
Route::redirect('/index', '/', 301);
Route::redirect('/index.php', '/', 301);
Route::redirect('/index.html', '/', 301);
Route::get('/debug-homepage', function () {
$page = Page::with(['headerTemplate', 'footerTemplate'])
->where('is_homepage', true)