<?php

namespace App\Http\Controllers;

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

class PrivacyPolicyController extends Controller
{
    public function index()
    {
        // Ambil 1 data terakhir yang statusnya ACTIVE
        $policy = PrivacyPolicy::where('is_active', true)
                    ->latest()
                    ->first();

        return view('privacy-policy.index', compact('policy'));
    }
}