<?php

namespace App\Http\Controllers;

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

class PrivacyController extends Controller
{
    public function __invoke()
    {
        $about = Privacy::first();

        if ($about) {
            return $about->makeHidden(['id', 'created_at', 'updated_at']);
        } else {
            return response()->json(['message' => 'No record found'], 404);
        }
    }
}
