Add Landing Page Section and Update Product Schema: Introduced a new LandingPageSection class to manage the layout and fields for the product landing page. Updated the ProductForm to include this new section, enhancing the product management interface. Added migration for landing_page_data in the products table and implemented localization for new fields in English and Turkish language files. Created a new landing Blade view to render the landing page dynamically, improving user experience and modularity.
This commit is contained in:
@@ -0,0 +1,228 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Filament\Admin\Resources\Products\Schemas;
|
||||||
|
|
||||||
|
use App\Models\Language;
|
||||||
|
use Filament\Forms\Components\Repeater;
|
||||||
|
use Filament\Forms\Components\Textarea;
|
||||||
|
use Filament\Forms\Components\TextInput;
|
||||||
|
use Filament\Forms\Components\Select;
|
||||||
|
use Filament\Forms\Components\FileUpload;
|
||||||
|
use Filament\Schemas\Components\Section;
|
||||||
|
use Filament\Schemas\Components\Tabs;
|
||||||
|
use Filament\Schemas\Components\Tabs\Tab;
|
||||||
|
use Filament\Schemas\Components\Utilities\Get;
|
||||||
|
|
||||||
|
class LandingPageSection
|
||||||
|
{
|
||||||
|
private static function getIconOptions(): array
|
||||||
|
{
|
||||||
|
$icons = [
|
||||||
|
'cloud-network-2', 'touchscreen', 'lock', 'rocket', 'bar-chart', 'safe',
|
||||||
|
'controls', 'checked', 'calendar', 'currency', 'server', 'devices',
|
||||||
|
'search', 'compare', 'smartphone', 'headphone', 'secure', 'verified',
|
||||||
|
'wallet', 'shopping-cart', 'e-commerce', 'code', 'bulb', 'gears',
|
||||||
|
'shield', 'star', 'check-circle', 'bolt', 'zap', 'heart', 'gift',
|
||||||
|
];
|
||||||
|
|
||||||
|
return array_combine($icons, array_map(fn($icon) => ucwords(str_replace('-', ' ', $icon)), $icons));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function getBackgroundOptions(): array
|
||||||
|
{
|
||||||
|
$backgrounds = [
|
||||||
|
// Abstract backgrounds
|
||||||
|
'assets/img/photos/bg2.jpg' => 'Background 2 (Abstract)',
|
||||||
|
'assets/img/photos/bg3.jpg' => 'Background 3 (Abstract)',
|
||||||
|
'assets/img/photos/bg4.jpg' => 'Background 4 (Abstract)',
|
||||||
|
'assets/img/photos/bg13.jpg' => 'Background 13 (Abstract)',
|
||||||
|
// Gradient backgrounds
|
||||||
|
'assets/img/photos/bg14.png' => 'Background 14 (Gradient)',
|
||||||
|
'assets/img/photos/bg15.png' => 'Background 15 (Gradient)',
|
||||||
|
'assets/img/photos/bg16.png' => 'Background 16 (Gradient)',
|
||||||
|
'assets/img/photos/bg17.png' => 'Background 17 (Gradient)',
|
||||||
|
'assets/img/photos/bg18.png' => 'Background 18 (Gradient)',
|
||||||
|
'assets/img/photos/bg19.png' => 'Background 19 (Gradient)',
|
||||||
|
'assets/img/photos/bg20.png' => 'Background 20 (Gradient)',
|
||||||
|
'assets/img/photos/bg21.png' => 'Background 21 (Gradient)',
|
||||||
|
'assets/img/photos/bg22.png' => 'Background 22 (Gradient)',
|
||||||
|
'assets/img/photos/bg23.png' => 'Background 23 (Gradient)',
|
||||||
|
'assets/img/photos/bg24.png' => 'Background 24 (Gradient)',
|
||||||
|
'assets/img/photos/bg25.png' => 'Background 25 (Gradient)',
|
||||||
|
];
|
||||||
|
|
||||||
|
return $backgrounds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function make(): Section
|
||||||
|
{
|
||||||
|
$languages = Language::active()->ordered()->get();
|
||||||
|
$iconOptions = self::getIconOptions();
|
||||||
|
$backgroundOptions = self::getBackgroundOptions();
|
||||||
|
|
||||||
|
return Section::make(__('products.landing_page_section'))
|
||||||
|
->schema([
|
||||||
|
// Hero Section
|
||||||
|
Section::make(__('products.hero_section'))
|
||||||
|
->schema([
|
||||||
|
TextInput::make('landing_page_data.hero.slogan')
|
||||||
|
->label(__('products.hero_slogan'))
|
||||||
|
->columnSpanFull(),
|
||||||
|
Textarea::make('landing_page_data.hero.sub_slogan')
|
||||||
|
->label(__('products.hero_sub_slogan'))
|
||||||
|
->rows(2)
|
||||||
|
->columnSpanFull(),
|
||||||
|
Select::make('landing_page_data.hero.background_image')
|
||||||
|
->label(__('products.hero_background_image'))
|
||||||
|
->options($backgroundOptions)
|
||||||
|
->searchable()
|
||||||
|
->placeholder(__('products.select_background'))
|
||||||
|
->helperText(__('products.hero_background_image_helper'))
|
||||||
|
->columnSpanFull(),
|
||||||
|
TextInput::make('landing_page_data.hero.app_store_link')
|
||||||
|
->label(__('products.app_store_link'))
|
||||||
|
->url()
|
||||||
|
->placeholder('https://apps.apple.com/...'),
|
||||||
|
TextInput::make('landing_page_data.hero.google_play_link')
|
||||||
|
->label(__('products.google_play_link'))
|
||||||
|
->url()
|
||||||
|
->placeholder('https://play.google.com/...'),
|
||||||
|
FileUpload::make('landing_page_data.hero.featured_image')
|
||||||
|
->label(__('products.hero_featured_image'))
|
||||||
|
->image()
|
||||||
|
->disk('public')
|
||||||
|
->directory('products/landing')
|
||||||
|
->columnSpanFull(),
|
||||||
|
])
|
||||||
|
->columns(2)
|
||||||
|
->collapsible()
|
||||||
|
->collapsed(),
|
||||||
|
|
||||||
|
// App Features Section
|
||||||
|
Section::make(__('products.app_features_section'))
|
||||||
|
->schema([
|
||||||
|
Repeater::make('landing_page_data.features')
|
||||||
|
->label(__('products.features'))
|
||||||
|
->schema([
|
||||||
|
Select::make('icon')
|
||||||
|
->label(__('products.feature_icon'))
|
||||||
|
->options($iconOptions)
|
||||||
|
->searchable()
|
||||||
|
->required(),
|
||||||
|
TextInput::make('title')
|
||||||
|
->label(__('products.feature_title'))
|
||||||
|
->required()
|
||||||
|
->columnSpanFull(),
|
||||||
|
Textarea::make('description')
|
||||||
|
->label(__('products.feature_description'))
|
||||||
|
->rows(2)
|
||||||
|
->columnSpanFull(),
|
||||||
|
])
|
||||||
|
->columns(1)
|
||||||
|
->defaultItems(0)
|
||||||
|
->addActionLabel(__('products.add_feature'))
|
||||||
|
->reorderable()
|
||||||
|
->collapsible()
|
||||||
|
->itemLabel(fn (array $state): ?string => $state['title'] ?? __('products.feature') . ' #' . ($state['_index'] ?? ''))
|
||||||
|
->columnSpanFull(),
|
||||||
|
|
||||||
|
// Note: Translations should match the order of features above
|
||||||
|
// Each feature translation array index should correspond to the feature index
|
||||||
|
])
|
||||||
|
->collapsible()
|
||||||
|
->collapsed(),
|
||||||
|
|
||||||
|
// How It Works Section
|
||||||
|
Section::make(__('products.how_it_works_section'))
|
||||||
|
->schema([
|
||||||
|
FileUpload::make('landing_page_data.how_it_works.download_image')
|
||||||
|
->label(__('products.how_it_works_image'))
|
||||||
|
->image()
|
||||||
|
->disk('public')
|
||||||
|
->directory('products/landing')
|
||||||
|
->columnSpanFull(),
|
||||||
|
TextInput::make('landing_page_data.how_it_works.download_form_label')
|
||||||
|
->label(__('products.download_form_label'))
|
||||||
|
->placeholder(__('products.download_form_label_placeholder'))
|
||||||
|
->columnSpanFull(),
|
||||||
|
|
||||||
|
// Steps (4 steps with translations)
|
||||||
|
Repeater::make('landing_page_data.how_it_works.steps')
|
||||||
|
->label(__('products.steps'))
|
||||||
|
->schema([
|
||||||
|
TextInput::make('number')
|
||||||
|
->label(__('products.step_number'))
|
||||||
|
->numeric()
|
||||||
|
->default(fn ($get) => ($get('../../../_index') ?? 0) + 1)
|
||||||
|
->required(),
|
||||||
|
TextInput::make('title')
|
||||||
|
->label(__('products.step_title'))
|
||||||
|
->required()
|
||||||
|
->columnSpanFull(),
|
||||||
|
Textarea::make('description')
|
||||||
|
->label(__('products.step_description'))
|
||||||
|
->rows(2)
|
||||||
|
->columnSpanFull(),
|
||||||
|
])
|
||||||
|
->columns(1)
|
||||||
|
->defaultItems(4)
|
||||||
|
->minItems(4)
|
||||||
|
->maxItems(4)
|
||||||
|
->reorderable(false)
|
||||||
|
->collapsible()
|
||||||
|
->itemLabel(fn (array $state): ?string => __('products.step') . ' ' . ($state['number'] ?? '') . ': ' . ($state['title'] ?? ''))
|
||||||
|
->columnSpanFull(),
|
||||||
|
|
||||||
|
// Note: Steps translations should match the order of steps above
|
||||||
|
// Each step translation array index should correspond to the step index
|
||||||
|
])
|
||||||
|
->collapsible()
|
||||||
|
->collapsed(),
|
||||||
|
|
||||||
|
// Video Section
|
||||||
|
Section::make(__('products.video_section'))
|
||||||
|
->schema([
|
||||||
|
TextInput::make('landing_page_data.video.youtube_video_id')
|
||||||
|
->label(__('products.youtube_video_id'))
|
||||||
|
->placeholder('165101721')
|
||||||
|
->helperText(__('products.youtube_video_id_helper'))
|
||||||
|
->columnSpanFull(),
|
||||||
|
])
|
||||||
|
->collapsible()
|
||||||
|
->collapsed(),
|
||||||
|
|
||||||
|
// FAQ Section
|
||||||
|
Section::make(__('products.faq_section'))
|
||||||
|
->schema([
|
||||||
|
Repeater::make('landing_page_data.faqs')
|
||||||
|
->label(__('products.faqs'))
|
||||||
|
->schema([
|
||||||
|
TextInput::make('question')
|
||||||
|
->label(__('products.faq_question'))
|
||||||
|
->required()
|
||||||
|
->columnSpanFull(),
|
||||||
|
Textarea::make('answer')
|
||||||
|
->label(__('products.faq_answer'))
|
||||||
|
->rows(3)
|
||||||
|
->required()
|
||||||
|
->columnSpanFull(),
|
||||||
|
])
|
||||||
|
->columns(1)
|
||||||
|
->defaultItems(0)
|
||||||
|
->addActionLabel(__('products.add_faq'))
|
||||||
|
->reorderable()
|
||||||
|
->collapsible()
|
||||||
|
->itemLabel(fn (array $state): ?string => $state['question'] ?? __('products.faq') . ' #' . ($state['_index'] ?? ''))
|
||||||
|
->columnSpanFull(),
|
||||||
|
|
||||||
|
// Note: FAQ translations should match the order of FAQs above
|
||||||
|
// Each FAQ translation array index should correspond to the FAQ index
|
||||||
|
])
|
||||||
|
->collapsible()
|
||||||
|
->collapsed(),
|
||||||
|
])
|
||||||
|
->visible(fn (Get $get) => $get('type') === 'product')
|
||||||
|
->columnSpanFull();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -9,6 +9,7 @@ use Filament\Forms\Components\Toggle;
|
|||||||
use Filament\Forms\Components\FileUpload;
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Schemas\Components\Section;
|
use Filament\Schemas\Components\Section;
|
||||||
use App\Filament\Admin\Resources\Components\TranslationTabs;
|
use App\Filament\Admin\Resources\Components\TranslationTabs;
|
||||||
|
use App\Filament\Admin\Resources\Products\Schemas\LandingPageSection;
|
||||||
use App\Models\ProductCategory;
|
use App\Models\ProductCategory;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Filament\Schemas\Components\Utilities\Get;
|
use Filament\Schemas\Components\Utilities\Get;
|
||||||
@@ -83,6 +84,9 @@ class ProductForm
|
|||||||
],
|
],
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
// Landing Page Section (only for products)
|
||||||
|
LandingPageSection::make(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,10 +68,17 @@ class ProductController extends Controller
|
|||||||
'description' => \Str::limit(strip_tags($product->translate('content')), 160),
|
'description' => \Str::limit(strip_tags($product->translate('content')), 160),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Use custom view template if specified
|
||||||
if ($product->view_template && view()->exists($product->view_template)) {
|
if ($product->view_template && view()->exists($product->view_template)) {
|
||||||
return view($product->view_template, compact('product', 'settings', 'renderedHeader', 'renderedFooter', 'meta'));
|
return view($product->view_template, compact('product', 'settings', 'renderedHeader', 'renderedFooter', 'meta'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use landing page template if landing_page_data exists and product type is 'product'
|
||||||
|
if ($product->type === 'product' && !empty($product->landing_page_data)) {
|
||||||
|
return view('front.products.landing', compact('product', 'settings', 'renderedHeader', 'renderedFooter', 'meta'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default view
|
||||||
return view('front.products.show', compact('product', 'settings', 'renderedHeader', 'renderedFooter', 'meta'));
|
return view('front.products.show', compact('product', 'settings', 'renderedHeader', 'renderedFooter', 'meta'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class Product extends Model
|
|||||||
'view_template',
|
'view_template',
|
||||||
'sort_order',
|
'sort_order',
|
||||||
'is_active',
|
'is_active',
|
||||||
|
'landing_page_data',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $translatable = [
|
protected $translatable = [
|
||||||
@@ -32,6 +33,7 @@ class Product extends Model
|
|||||||
'is_active' => 'boolean',
|
'is_active' => 'boolean',
|
||||||
'title' => 'array',
|
'title' => 'array',
|
||||||
'content' => 'array',
|
'content' => 'array',
|
||||||
|
'landing_page_data' => 'array',
|
||||||
];
|
];
|
||||||
|
|
||||||
public static function boot()
|
public static function boot()
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('products', function (Blueprint $table) {
|
||||||
|
$table->json('landing_page_data')->nullable()->after('content');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('products', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('landing_page_data');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -25,6 +25,43 @@ return [
|
|||||||
// Table
|
// Table
|
||||||
'title' => 'Title',
|
'title' => 'Title',
|
||||||
'created_at' => 'Created At',
|
'created_at' => 'Created At',
|
||||||
|
|
||||||
|
// Landing Page
|
||||||
|
'landing_page_section' => 'Landing Page Template',
|
||||||
|
'hero_section' => 'Hero Section',
|
||||||
|
'hero_slogan' => 'Main Slogan',
|
||||||
|
'hero_sub_slogan' => 'Sub Slogan',
|
||||||
|
'app_store_link' => 'App Store Link',
|
||||||
|
'google_play_link' => 'Google Play Link',
|
||||||
|
'hero_featured_image' => 'Featured Image',
|
||||||
|
'hero_background_image' => 'Hero Background Image',
|
||||||
|
'hero_background_image_helper' => 'Select the background image for the hero section',
|
||||||
|
'select_background' => 'Select background...',
|
||||||
|
'app_features_section' => 'App Features',
|
||||||
|
'features' => 'Features',
|
||||||
|
'add_feature' => 'Add Feature',
|
||||||
|
'feature' => 'Feature',
|
||||||
|
'feature_icon' => 'Icon',
|
||||||
|
'feature_title' => 'Feature Title',
|
||||||
|
'feature_description' => 'Feature Description',
|
||||||
|
'how_it_works_section' => 'How It Works',
|
||||||
|
'how_it_works_image' => 'Image',
|
||||||
|
'download_form_label' => 'Download Form Label',
|
||||||
|
'download_form_label_placeholder' => 'Download the app',
|
||||||
|
'steps' => 'Steps',
|
||||||
|
'step' => 'Step',
|
||||||
|
'step_number' => 'Step Number',
|
||||||
|
'step_title' => 'Step Title',
|
||||||
|
'step_description' => 'Step Description',
|
||||||
|
'video_section' => 'Video',
|
||||||
|
'youtube_video_id' => 'YouTube Video ID',
|
||||||
|
'youtube_video_id_helper' => 'The ID from YouTube video URL (e.g.: 165101721)',
|
||||||
|
'faq_section' => 'Frequently Asked Questions',
|
||||||
|
'faqs' => 'FAQs',
|
||||||
|
'add_faq' => 'Add FAQ',
|
||||||
|
'faq' => 'FAQ',
|
||||||
|
'faq_question' => 'Question',
|
||||||
|
'faq_answer' => 'Answer',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,43 @@ return [
|
|||||||
// Table
|
// Table
|
||||||
'title' => 'Başlık',
|
'title' => 'Başlık',
|
||||||
'created_at' => 'Oluşturulma Tarihi',
|
'created_at' => 'Oluşturulma Tarihi',
|
||||||
|
|
||||||
|
// Landing Page
|
||||||
|
'landing_page_section' => 'Landing Page Şablonu',
|
||||||
|
'hero_section' => 'Hero Bölümü',
|
||||||
|
'hero_slogan' => 'Ana Slogan',
|
||||||
|
'hero_sub_slogan' => 'Alt Slogan',
|
||||||
|
'app_store_link' => 'App Store Linki',
|
||||||
|
'google_play_link' => 'Google Play Linki',
|
||||||
|
'hero_featured_image' => 'Öne Çıkan Görsel',
|
||||||
|
'hero_background_image' => 'Hero Arka Plan Görseli',
|
||||||
|
'hero_background_image_helper' => 'Hero section için kullanılacak arka plan görselini seçin',
|
||||||
|
'select_background' => 'Arka plan seçin...',
|
||||||
|
'app_features_section' => 'Uygulama Özellikleri',
|
||||||
|
'features' => 'Özellikler',
|
||||||
|
'add_feature' => 'Özellik Ekle',
|
||||||
|
'feature' => 'Özellik',
|
||||||
|
'feature_icon' => 'İkon',
|
||||||
|
'feature_title' => 'Özellik Başlığı',
|
||||||
|
'feature_description' => 'Özellik Açıklaması',
|
||||||
|
'how_it_works_section' => 'Nasıl Çalışır',
|
||||||
|
'how_it_works_image' => 'Görsel',
|
||||||
|
'download_form_label' => 'Download Form Etiketi',
|
||||||
|
'download_form_label_placeholder' => 'Download the app',
|
||||||
|
'steps' => 'Adımlar',
|
||||||
|
'step' => 'Adım',
|
||||||
|
'step_number' => 'Adım Numarası',
|
||||||
|
'step_title' => 'Adım Başlığı',
|
||||||
|
'step_description' => 'Adım Açıklaması',
|
||||||
|
'video_section' => 'Video',
|
||||||
|
'youtube_video_id' => 'YouTube Video ID',
|
||||||
|
'youtube_video_id_helper' => 'YouTube video URL\'sindeki ID (örn: 165101721)',
|
||||||
|
'faq_section' => 'Sık Sorulan Sorular',
|
||||||
|
'faqs' => 'SSS',
|
||||||
|
'add_faq' => 'SSS Ekle',
|
||||||
|
'faq' => 'SSS',
|
||||||
|
'faq_question' => 'Soru',
|
||||||
|
'faq_answer' => 'Cevap',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,295 @@
|
|||||||
|
|
||||||
|
@extends('layouts.site', ['headerTemplate' => 'Demo29 Header'])
|
||||||
|
|
||||||
|
@php
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@section('title', $product->translate('title') ?? 'Ürün Detayı')
|
||||||
|
@section('meta_description', Str::limit(strip_tags($product->translate('content')), 160))
|
||||||
|
@php
|
||||||
|
$landingData = $product->landing_page_data ?? [];
|
||||||
|
$hero = $landingData['hero'] ?? [];
|
||||||
|
$features = $landingData['features'] ?? [];
|
||||||
|
$howItWorks = $landingData['how_it_works'] ?? [];
|
||||||
|
$steps = $howItWorks['steps'] ?? [];
|
||||||
|
$video = $landingData['video'] ?? [];
|
||||||
|
$faqs = $landingData['faqs'] ?? [];
|
||||||
|
$currentLang = app()->getLocale();
|
||||||
|
|
||||||
|
// Helper function to get translated value with fallback
|
||||||
|
$getTranslated = function($item, $key, $default = '') {
|
||||||
|
global $currentLang;
|
||||||
|
if (isset($item["{$key}_{$currentLang}"])) {
|
||||||
|
return $item["{$key}_{$currentLang}"];
|
||||||
|
}
|
||||||
|
return $item[$key] ?? $default;
|
||||||
|
};
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
{{-- Hero Section --}}
|
||||||
|
@if(!empty($hero))
|
||||||
|
<section class="wrapper image-wrapper bg-full bg-image bg-overlay bg-overlay-light-600 [background-size:100%] bg-[center_center] bg-no-repeat bg-scroll relative z-0 before:content-[''] before:block before:absolute before:z-[1] before:w-full before:h-full before:left-0 before:top-0 before:bg-[rgba(255,255,255,.6)]" data-image-src="{{ !empty($hero['background_image']) ? asset($hero['background_image']) : asset('assets/img/photos/bg23.png') }}">
|
||||||
|
<div class="container pt-24 xl:pt-32 lg:pt-32 md:pt-32 pb-9">
|
||||||
|
<div class="flex flex-wrap mx-0 !mt-[-50px] items-center text-center lg:text-left xl:text-left">
|
||||||
|
<div class="xl:w-6/12 lg:w-6/12 xxl:w-5/12 w-full flex-[0_0_auto] max-w-full !relative !mt-[50px]" data-cues="slideInDown" data-group="page-title" data-delay="700">
|
||||||
|
@if(!empty($hero['slogan']))
|
||||||
|
<h1 class="xl:!text-[2.5rem] !text-[calc(1.375rem_+_1.5vw)] font-semibold !leading-[1.15] !mb-4">
|
||||||
|
{!! nl2br(e($hero['slogan'])) !!}
|
||||||
|
</h1>
|
||||||
|
@endif
|
||||||
|
@if(!empty($hero['sub_slogan']))
|
||||||
|
<p class="lead !text-[1.2rem] !leading-[1.5] !font-normal !mb-7">{{ $hero['sub_slogan'] }}</p>
|
||||||
|
@endif
|
||||||
|
<div class="flex justify-center lg:!justify-start xl:!justify-start" data-cues="slideInDown" data-group="page-title-buttons" data-delay="1800">
|
||||||
|
@if(!empty($hero['app_store_link']))
|
||||||
|
<span class="inline-flex"><a href="{{ $hero['app_store_link'] }}" target="_blank" class="!mr-2 inline-block">
|
||||||
|
<img src="{{ asset('assets/img/photos/button-appstore.svg') }}" class="!h-[3rem] !rounded-[0.8rem]" alt="App Store">
|
||||||
|
</a></span>
|
||||||
|
@endif
|
||||||
|
@if(!empty($hero['google_play_link']))
|
||||||
|
<span class="inline-flex"><a href="{{ $hero['google_play_link'] }}" target="_blank" class="inline-block">
|
||||||
|
<img src="{{ asset('assets/img/photos/button-google-play.svg') }}" class="!h-[3rem] !rounded-[0.8rem]" alt="Google Play">
|
||||||
|
</a></span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /column -->
|
||||||
|
@if(!empty($hero['featured_image']))
|
||||||
|
<div class="xl:w-6/12 lg:w-6/12 w-full flex-[0_0_auto] max-w-full !ml-auto !mb-[-10rem] xxl:!mb-[-15rem] !mt-[50px]" data-cues="slideInDown" data-delay="600">
|
||||||
|
<figure class="m-0 p-0">
|
||||||
|
<img class="w-full max-w-full !h-auto" src="{{ Storage::url($hero['featured_image']) }}" alt="{{ $product->translate('title') }}">
|
||||||
|
</figure>
|
||||||
|
</div>
|
||||||
|
<!-- /column -->
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
</div>
|
||||||
|
<!-- /.container -->
|
||||||
|
<div class="overflow-hidden" style="z-index:1;">
|
||||||
|
<div class="divider !text-[#fefefe] mx-[-0.5rem]">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 100">
|
||||||
|
<g fill="currentColor">
|
||||||
|
<polygon points="1440 100 0 100 0 85 1440 0 1440 100" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.overflow-hidden -->
|
||||||
|
</section>
|
||||||
|
<!-- /section -->
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- App Features Section --}}
|
||||||
|
@if(!empty($features))
|
||||||
|
<section class="wrapper !bg-[#ffffff]">
|
||||||
|
<div class="container pt-32 xl:pt-40 lg:pt-40 md:pt-40 pb-[4.5rem] xl:pb-24 lg:pb-24 md:pb-24">
|
||||||
|
<div class="flex flex-wrap mx-[-15px] !text-center">
|
||||||
|
<div class="lg:w-10/12 xl:w-9/12 xxl:w-8/12 flex-[0_0_auto] !px-[15px] max-w-full !mx-auto !relative">
|
||||||
|
<h2 class="!text-[0.8rem] !leading-[1.35] !tracking-[0.02rem] uppercase !text-[#aab0bc] !mb-3">App Features</h2>
|
||||||
|
<h3 class="xl:!text-[2rem] !text-[calc(1.325rem_+_0.9vw)] font-semibold !leading-[1.2] !mb-12 lg:!px-5 xl:!px-0 xxl:!px-6">
|
||||||
|
{{ $product->translate('title') }} makes your experience <span class="text-gradient gradient-7">better</span> for you to have the perfect control.
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<!-- /column -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
<div class="flex flex-wrap mx-[-15px] !mb-40">
|
||||||
|
<div class="xxl:w-11/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||||
|
<div class="flex flex-wrap mx-[-15px] xl:mx-[-20px] lg:mx-[-20px] md:mx-[-20px] !mt-[-50px] !text-center">
|
||||||
|
@foreach($features as $index => $feature)
|
||||||
|
<div class="md:w-6/12 lg:w-3/12 xl:w-3/12 w-full flex-[0_0_auto] !px-[15px] xl:!px-[20px] lg:!px-[20px] md:!px-[20px] !mt-[50px] max-w-full">
|
||||||
|
@if(!empty($feature['icon']))
|
||||||
|
<div class="svg-bg svg-bg-lg !bg-[#fef3e4] !rounded-[0.8rem] !mb-4">
|
||||||
|
@php
|
||||||
|
$iconPath = public_path('docs/styleguide/_/assets/img/icons/solid/' . $feature['icon'] . '.svg');
|
||||||
|
$iconUrl = file_exists($iconPath)
|
||||||
|
? asset('docs/styleguide/_/assets/img/icons/solid/' . $feature['icon'] . '.svg')
|
||||||
|
: null;
|
||||||
|
@endphp
|
||||||
|
@if($iconUrl)
|
||||||
|
<img src="{{ $iconUrl }}" class="icon-svg solid text-[#343f52] text-navy" alt="{{ $feature['title'] ?? '' }}" style="width: 48px; height: 48px;">
|
||||||
|
@else
|
||||||
|
<div class="w-12 h-12 bg-gray-200 rounded-lg flex items-center justify-center">
|
||||||
|
<span class="text-gray-400 text-xs">{{ substr($feature['icon'], 0, 2) }}</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@if(!empty($feature['title']))
|
||||||
|
<h4 class="!text-[1rem]">{{ $feature['title'] }}</h4>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<!--/column -->
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
<!--/.row -->
|
||||||
|
</div>
|
||||||
|
<!-- /column -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
</div>
|
||||||
|
<!-- /.container -->
|
||||||
|
</section>
|
||||||
|
<!-- /section -->
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- How It Works Section --}}
|
||||||
|
@if(!empty($howItWorks) && !empty($steps))
|
||||||
|
<section class="wrapper !bg-[#ffffff]">
|
||||||
|
<div class="container pt-32 xl:pt-40 lg:pt-40 md:pt-40 pb-[4.5rem] xl:pb-24 lg:pb-24 md:pb-24">
|
||||||
|
<div class="flex flex-wrap mx-[-15px] !text-center">
|
||||||
|
<div class="md:w-10/12 lg:w-7/12 xl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto !relative">
|
||||||
|
<h2 class="!text-[0.8rem] !tracking-[0.02rem] uppercase !text-[#aab0bc] !mb-3 !leading-[1.35]">How It Works</h2>
|
||||||
|
@if(!empty($howItWorks['download_form_label']))
|
||||||
|
<h3 class="!text-[calc(1.325rem_+_0.9vw)] font-bold !leading-[1.2] xl:!text-[2rem] !mb-8 xl:!px-6">
|
||||||
|
{{ $howItWorks['download_form_label'] }}
|
||||||
|
</h3>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<!-- /column -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
<div class="flex flex-wrap mx-[-15px] lg:!mb-40 xl:!mb-[17.5rem]">
|
||||||
|
<div class="xxl:w-11/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||||
|
<div class="flex flex-wrap mx-[-15px] !mt-[-50px] xl:!mt-0 lg:!mt-0 !text-center items-center">
|
||||||
|
@if(!empty($howItWorks['download_image']))
|
||||||
|
<div class="md:w-6/12 lg:w-4/12 xl:w-4/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto !mb-[-2.5rem] lg:!mb-0 xl:!mb-0 !mt-[50px] xl:!mt-0 lg:!mt-0">
|
||||||
|
<figure class="mx-auto">
|
||||||
|
<img src="{{ Storage::url($howItWorks['download_image']) }}" alt="How It Works">
|
||||||
|
</figure>
|
||||||
|
</div>
|
||||||
|
<!-- /column -->
|
||||||
|
@endif
|
||||||
|
<div class="w-full xl:!hidden lg:!hidden !px-[15px] !mt-[50px] xl:!mt-0 lg:!mt-0"></div>
|
||||||
|
<div class="md:w-6/12 lg:w-4/12 xl:w-4/12 w-full flex-[0_0_auto] !px-[15px] max-w-full lg:!-order-1 xl:!-order-1 !mt-[50px] xl:!mt-0 lg:!mt-0">
|
||||||
|
@foreach($steps as $index => $step)
|
||||||
|
@if($index < 2)
|
||||||
|
<div class="{{ $index === 0 ? '!mb-8' : '' }}">
|
||||||
|
<span class="xl:!text-[3rem] !text-[calc(1.425rem_+_2.1vw)] !leading-none !mb-3 font-medium text-gradient gradient-3">{{ str_pad($step['number'] ?? ($index + 1), 2, '0', STR_PAD_LEFT) }}</span>
|
||||||
|
@if(!empty($step['title']))
|
||||||
|
<h4 class="!text-[1rem]">{{ $step['title'] }}</h4>
|
||||||
|
@endif
|
||||||
|
@if(!empty($step['description']))
|
||||||
|
<p class="!mb-0 xl:!px-7">{{ $step['description'] }}</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<!-- /div -->
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
<!-- /column -->
|
||||||
|
<div class="md:w-6/12 lg:w-4/12 xl:w-4/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mt-[50px] xl:!mt-0 lg:!mt-0">
|
||||||
|
@foreach($steps as $index => $step)
|
||||||
|
@if($index >= 2)
|
||||||
|
<div class="{{ $index === 2 ? '!mb-8' : '' }}">
|
||||||
|
<span class="xl:!text-[3rem] !text-[calc(1.425rem_+_2.1vw)] !leading-none !mb-3 font-medium text-gradient gradient-3">{{ str_pad($step['number'] ?? ($index + 1), 2, '0', STR_PAD_LEFT) }}</span>
|
||||||
|
@if(!empty($step['title']))
|
||||||
|
<h4 class="!text-[1rem]">{{ $step['title'] }}</h4>
|
||||||
|
@endif
|
||||||
|
@if(!empty($step['description']))
|
||||||
|
<p class="!mb-0 xl:!px-7">{{ $step['description'] }}</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<!-- /div -->
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
<!-- /column -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
</div>
|
||||||
|
<!-- /column -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
</div>
|
||||||
|
<!-- /.container -->
|
||||||
|
</section>
|
||||||
|
<!-- /section -->
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- Video Section --}}
|
||||||
|
@if(!empty($video['youtube_video_id']))
|
||||||
|
<section class="wrapper image-wrapper bg-full bg-image bg-overlay bg-overlay-light-600 bg-content [background-size:100%] bg-[center_center] bg-no-repeat bg-scroll relative z-0 before:content-[''] before:block before:absolute before:z-[1] before:w-full before:h-full before:left-0 before:top-0 before:bg-[rgba(255,255,255,.6)]" data-image-src="{{ !empty($hero['background_image']) ? asset($hero['background_image']) : asset('assets/img/photos/bg23.png') }}">
|
||||||
|
<div class="container py-[4.5rem] md:pt-24 lg:pt-0 xl:pt-0 xl:pb-[7rem] lg:pb-[7rem] md:pb-[7rem] !relative" style="z-index: 2;">
|
||||||
|
<div class="flex flex-wrap mx-[-15px]">
|
||||||
|
<div class="xl:w-11/12 xxl:w-10/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||||
|
<div class="lg:!mt-[-10rem] xl:!mt-[-15rem] !mb-[4.5rem] xl:!mb-[6rem] lg:!mb-[6rem] md:!mb-[6rem] !rounded-[0.8rem]">
|
||||||
|
<div class="player relative z-[2] rounded-[0.4rem]">
|
||||||
|
<iframe src="https://www.youtube.com/embed/{{ $video['youtube_video_id'] }}"
|
||||||
|
frameborder="0"
|
||||||
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
|
allowfullscreen
|
||||||
|
style="width: 100%; height: 600px; border-radius: 0.4rem;">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/column -->
|
||||||
|
</div>
|
||||||
|
<!--/.row -->
|
||||||
|
</div>
|
||||||
|
<!-- /.container -->
|
||||||
|
</section>
|
||||||
|
<!-- /section -->
|
||||||
|
@endif
|
||||||
|
|
||||||
|
{{-- FAQ Section --}}
|
||||||
|
@if(!empty($faqs))
|
||||||
|
<section class="wrapper image-wrapper bg-full bg-image bg-overlay bg-overlay-light-600 bg-content [background-size:100%] bg-[center_center] bg-no-repeat bg-scroll relative z-0 before:content-[''] before:block before:absolute before:z-[1] before:w-full before:h-full before:left-0 before:top-0 before:bg-[rgba(255,255,255,.6)]" data-image-src="{{ !empty($hero['background_image']) ? asset($hero['background_image']) : asset('assets/img/photos/bg23.png') }}">
|
||||||
|
<div class="container py-[4.5rem] md:pt-24 lg:pt-0 xl:pt-0 xl:pb-[7rem] lg:pb-[7rem] md:pb-[7rem] !relative" style="z-index: 2;">
|
||||||
|
<div class="flex flex-wrap mx-[-15px]">
|
||||||
|
<div class="xl:w-11/12 xxl:w-10/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||||
|
<div class="!relative">
|
||||||
|
<h2 class="!text-[0.8rem] uppercase !text-[#aab0bc] !mb-3 !text-center !leading-[1.35]">FAQ</h2>
|
||||||
|
<h3 class="!text-[calc(1.325rem_+_0.9vw)] font-bold !leading-[1.2] xl:!text-[2rem] !mb-12 lg:!px-8 xl:!px-12 !text-center">
|
||||||
|
If you don't see an <span class="text-gradient gradient-7">answer</span> to your question, you can send us an email from our contact form.
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-wrap mx-[-15px]">
|
||||||
|
<div class="xl:w-10/12 lg:w-10/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||||
|
<div id="accordion-faq" class="accordion-wrapper">
|
||||||
|
@foreach($faqs as $index => $faq)
|
||||||
|
<div class="card accordion-item !mb-5 !shadow-[0_0.25rem_1.75rem_rgba(30,34,40,0.07)]">
|
||||||
|
<div class="card-header !mb-0 !p-[.9rem_1.3rem_.85rem] !border-0 !rounded-[0.4rem] !bg-inherit" id="accordion-heading-faq-{{ $index }}">
|
||||||
|
<button class="!text-[#343f52] !text-[0.9rem] hover:!text-[#e31e24] before:!text-[#e31e24] collapsed"
|
||||||
|
data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#accordion-collapse-faq-{{ $index }}"
|
||||||
|
aria-expanded="false"
|
||||||
|
aria-controls="accordion-collapse-faq-{{ $index }}">
|
||||||
|
{{ $faq['question'] ?? '' }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div id="accordion-collapse-faq-{{ $index }}"
|
||||||
|
class="collapse"
|
||||||
|
aria-labelledby="accordion-heading-faq-{{ $index }}"
|
||||||
|
data-bs-target="#accordion-faq">
|
||||||
|
<div class="card-body flex-[1_1_auto] p-[0_1.25rem_.25rem_2.35rem]">
|
||||||
|
<p>{!! nl2br(e($faq['answer'] ?? '')) !!}</p>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /.collapse -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card -->
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
<!-- /.accordion-wrapper -->
|
||||||
|
</div>
|
||||||
|
<!--/column -->
|
||||||
|
</div>
|
||||||
|
<!--/.row -->
|
||||||
|
</div>
|
||||||
|
<!--/column -->
|
||||||
|
</div>
|
||||||
|
<!--/.row -->
|
||||||
|
</div>
|
||||||
|
<!-- /.container -->
|
||||||
|
</section>
|
||||||
|
<!-- /section -->
|
||||||
|
@endif
|
||||||
|
@endsection
|
||||||
|
|
||||||
@@ -16,6 +16,7 @@ $favicon_path = setting('site_favicon');
|
|||||||
<link rel="stylesheet" href="{{ asset('assets/css/plugins.css') }}">
|
<link rel="stylesheet" href="{{ asset('assets/css/plugins.css') }}">
|
||||||
<link rel="stylesheet" href="{{ asset('assets/css/colors/grape.css') }}">
|
<link rel="stylesheet" href="{{ asset('assets/css/colors/grape.css') }}">
|
||||||
<link rel="preload" href="{{ asset('assets/css/fonts/urbanist.css') }}" as="style" onload="this.rel='stylesheet'">
|
<link rel="preload" href="{{ asset('assets/css/fonts/urbanist.css') }}" as="style" onload="this.rel='stylesheet'">
|
||||||
|
<link rel="preload" href="{{ asset('assets/css/fonts/space.css') }}" as="style" onload="this.rel='stylesheet'">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
<?php echo setting('custom_css') ?>
|
<?php echo setting('custom_css') ?>
|
||||||
@@ -24,21 +25,93 @@ $favicon_path = setting('site_favicon');
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{-- Dynamic Header Template or Static Navbar --}}
|
{{-- Dynamic Header Template or Static Navbar --}}
|
||||||
@if(isset($header) && $header)
|
@php
|
||||||
@include($header)
|
$finalHeader = null;
|
||||||
@elseif(isset($renderedHeader) && $renderedHeader)
|
|
||||||
{!! $renderedHeader !!}
|
// 1. String Başlık Kontrolü: Eğer string geldiyse (örn: "Demo29 Header"), modelini bul
|
||||||
|
if (isset($headerTemplate) && is_string($headerTemplate)) {
|
||||||
|
$foundTemplate = \App\Models\HeaderTemplate::where('title', $headerTemplate)
|
||||||
|
->where('is_active', true)
|
||||||
|
->first();
|
||||||
|
if ($foundTemplate) {
|
||||||
|
$headerTemplate = $foundTemplate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Model Instance Varsa Render Et (En Yüksek Öncelik)
|
||||||
|
// Kullanıcı template seçtiyse bu çalışır ve renderedHeader'ı ezer.
|
||||||
|
if (isset($headerTemplate) && $headerTemplate instanceof \App\Models\HeaderTemplate) {
|
||||||
|
$templateDefaults = $headerTemplate->default_data ?? [];
|
||||||
|
$templateData = $header_data ?? [];
|
||||||
|
$mergedData = array_merge($templateDefaults, $templateData);
|
||||||
|
$model = $page ?? null;
|
||||||
|
$finalHeader = \App\Services\TemplateService::replacePlaceholders(
|
||||||
|
$headerTemplate->html_content,
|
||||||
|
$mergedData,
|
||||||
|
$model
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Blade dosyası path'i varsa include et (RenderedHeader'dan ÖNCE kontrol edilmeli)
|
||||||
|
if (!$finalHeader && isset($header) && $header) {
|
||||||
|
$finalHeader = view($header)->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Eğer yukarıdan sonuç çıkmadıysa ve Controller zaten render ettiyse onu kullan
|
||||||
|
if (!$finalHeader && isset($renderedHeader) && $renderedHeader) {
|
||||||
|
$finalHeader = $renderedHeader;
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if($finalHeader)
|
||||||
|
{!! $finalHeader !!}
|
||||||
@else
|
@else
|
||||||
@include('partials.header')
|
@include('partials.header')
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
{{-- Main Content --}}
|
{{-- Main Content --}}
|
||||||
@yield('content')
|
@yield('content')
|
||||||
|
|
||||||
{{-- Dynamic Footer Template or Static Footer --}}
|
{{-- Dynamic Footer Template or Static Footer --}}
|
||||||
@if(isset($footer) && $footer)
|
@php
|
||||||
@include($footer)
|
$finalFooter = null;
|
||||||
@elseif(isset($renderedFooter) && !empty(trim($renderedFooter)))
|
|
||||||
{!! $renderedFooter !!}
|
// 1. String Başlık Kontrolü
|
||||||
|
if (isset($footerTemplate) && is_string($footerTemplate)) {
|
||||||
|
$foundTemplate = \App\Models\FooterTemplate::where('title', $footerTemplate)
|
||||||
|
->where('is_active', true)
|
||||||
|
->first();
|
||||||
|
if ($foundTemplate) {
|
||||||
|
$footerTemplate = $foundTemplate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Model Instance Varsa Render Et (En Yüksek Öncelik)
|
||||||
|
if (isset($footerTemplate) && $footerTemplate instanceof \App\Models\FooterTemplate) {
|
||||||
|
$templateDefaults = $footerTemplate->default_data ?? [];
|
||||||
|
$templateData = $footer_data ?? [];
|
||||||
|
$mergedData = array_merge($templateDefaults, $templateData);
|
||||||
|
$model = $page ?? null;
|
||||||
|
$finalFooter = \App\Services\TemplateService::replacePlaceholders(
|
||||||
|
$footerTemplate->html_content,
|
||||||
|
$mergedData,
|
||||||
|
$model
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. Blade dosyası path'i (RenderedFooter'dan ÖNCE)
|
||||||
|
if (!$finalFooter && isset($footer) && $footer) {
|
||||||
|
$finalFooter = view($footer)->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. Controller'dan gelen renderedFooter
|
||||||
|
if (!$finalFooter && isset($renderedFooter) && !empty(trim($renderedFooter ?? ''))) {
|
||||||
|
$finalFooter = $renderedFooter;
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if($finalFooter)
|
||||||
|
{!! $finalFooter !!}
|
||||||
@else
|
@else
|
||||||
@include('partials.footer')
|
@include('partials.footer')
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
@php
|
@extends('layouts.site', ['header' => 'partials.header', 'footer' => 'partials.footer'])
|
||||||
$header = "partials.header";
|
|
||||||
$footer = "partials.footer";
|
|
||||||
@endphp
|
|
||||||
@extends('layouts.site')
|
|
||||||
|
|
||||||
@section('title', 'Anasayfa')
|
@section('title', 'Anasayfa')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user