<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use App\Models\Footer;

class FooterController extends Controller
{
    public function index(): JsonResponse
    {
        $footer = Footer::first();
        $links = $footer ? $footer->links : [];

        return response()->json([
            'status' => 'success',
            'data' => $links
        ]);
    }
}
