<?php

namespace App\Http\Controllers;

use App\Models\ContentSection;
use Illuminate\Http\Request;

class AboutController extends Controller
{
    public function index()
    {
        // Get content sections for About page
        $heroSection = ContentSection::where('section_key', 'about_hero')
            ->where('is_active', true)
            ->first();
            
        $storySection = ContentSection::where('section_key', 'about_story')
            ->where('is_active', true)
            ->first();
            
        $ctaSection = ContentSection::where('section_key', 'about_cta')
            ->where('is_active', true)
            ->first();

        return view('about', compact(
            'heroSection',
            'storySection',
            'ctaSection'
        ));
    }
}