<?php

namespace App\Http\Controllers;

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

class TermsController extends Controller
{
    public function __invoke()
    {
        $about = Terms::first();

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