<?php

namespace App\Http\Controllers\Api;

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

class AppSettingController extends Controller
{
    /**
     * GET /api/settings — returns the global app settings (colors, logo,
     * banner, force-update info, etc.). Public.
     */
    public function index()
    {
        $row = AppSetting::orderBy('id')->first();
        return response()->json([
            'success' => true,
            'data' => $row ?: [],
        ]);
    }
}
