<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\Setting;
use Illuminate\View\View;

class ContactController extends Controller
{
    public function index(): View
    {
        $setting = Setting::first();

        $contact = [
            'email'     => $setting?->contact_email,
            'phone'     => $setting?->contact_phone,
            'address'   => $setting?->contact_address,
            'facebook'  => $setting?->facebook_url,
            'instagram' => $setting?->instagram_url,
            'tiktok'    => $setting?->tiktok_url,
        ];

        return view('pages.contact', compact('contact'));
    }
}
