<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Http\Resources\Api\SettingResource;
use App\Models\Setting;
use Illuminate\Http\Request;

class SettingController extends Controller
{
    
    // smtpData
    public function smtpData()
    {
        
        $settings = Setting::whereIn('key' , ['smtp_host' , 'smtp_port' , 'smtp_encryption' , 'smtp_username' , 'smtp_password'])->get();
        
        return response()->json(['data' , SettingResource::collection($settings)]);

    }

}
