feat: Add Logos page, refactor Testimonials to RelationManager, and improve designs
This commit is contained in:
+24
-2
@@ -12,6 +12,7 @@ Route::redirect('/index', '/', 301);
|
||||
Route::redirect('/index.php', '/', 301);
|
||||
Route::redirect('/index.html', '/', 301);
|
||||
|
||||
// Debug Route - Veritabanı kontrolü (Sadece super_admin)
|
||||
Route::get('/debug-homepage', function () {
|
||||
$page = Page::with(['headerTemplate', 'footerTemplate'])
|
||||
->where('is_homepage', true)
|
||||
@@ -57,7 +58,7 @@ Route::get('/debug-homepage', function () {
|
||||
'data' => $page->sections_data,
|
||||
],
|
||||
]);
|
||||
});
|
||||
})->middleware(['auth', \App\Http\Middleware\SuperAdminMiddleware::class]);
|
||||
|
||||
// Language Switch
|
||||
Route::get('/lang/{locale}', function ($locale) {
|
||||
@@ -87,7 +88,7 @@ Route::any('/admin/template-preview', [TemplatePreviewController::class, 'previe
|
||||
->name('template.preview');
|
||||
|
||||
// Site Translations API (DevExtreme DataGrid için)
|
||||
Route::prefix('admin/api')->middleware(['auth'])->group(function () {
|
||||
Route::prefix('admin/api')->middleware(['auth', \App\Http\Middleware\SuperAdminMiddleware::class])->group(function () {
|
||||
Route::get('/site-translations', [SiteTranslationController::class, 'index'])->name('api.site-translations.index');
|
||||
Route::post('/site-translations', [SiteTranslationController::class, 'store'])->name('api.site-translations.store');
|
||||
Route::put('/site-translations/{id}', [SiteTranslationController::class, 'update'])->name('api.site-translations.update');
|
||||
@@ -99,5 +100,26 @@ Route::prefix('admin/api')->middleware(['auth'])->group(function () {
|
||||
// Products & Services
|
||||
Route::get('/urun-hizmet/{slug}', [\App\Http\Controllers\ProductController::class, 'show'])->name('products.show');
|
||||
|
||||
// Logo Preview
|
||||
Route::get('/logo-preview', function (Illuminate\Http\Request $request) {
|
||||
$path = $request->query('path');
|
||||
$bg = $request->query('bg', 'ffffff');
|
||||
if (!$path) abort(404);
|
||||
|
||||
return "
|
||||
<html>
|
||||
<head>
|
||||
<title>Logo Preview</title>
|
||||
<style>
|
||||
body { margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; min-height: 100vh; background-color: #$bg; }
|
||||
img { max-width: 90%; max-height: 90vh; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<img src='" . asset('storage/' . $path) . "' />
|
||||
</body>
|
||||
</html>";
|
||||
})->name('logo.preview');
|
||||
|
||||
// Pages (en sonda olmalı - catch-all)
|
||||
Route::get('/{slug}', [PageController::class, 'show'])->name('page.show');
|
||||
|
||||
Reference in New Issue
Block a user