<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Inertia\Inertia;
use App\Models\Gallery;
use App\Models\Setting;

class GalleryController extends Controller
{
    public function index()
    {
        $setting = Setting::firstOrCreate([]);
        $galleries = Gallery::orderBy('order')->get();
        return Inertia::render('Gallery', [
            'setting' => $setting,
            'galleries' => $galleries,
        ]);
    }
}
