<?php

namespace Wave\Http\Controllers\API;

use App\Http\Controllers\Controller;
use App\Models\SiteSetting;

class TermsAndConditionsController extends Controller
{
    public function index()
    {
        $siteSetting = SiteSetting::latest()->first();

        return response()->json([
            'message' => 'Terms and conditions has successfully retrieved!',
            'terms_and_conditions' => $siteSetting ? $siteSetting->terms_and_conditions : '',
        ]);
    }
}
