<?php
use Illuminate\Support\Facades\Route;

// Serve frontend (SPA) — all routes handled by frontend router
Route::get('/{any}', function () {
    return file_exists(public_path('index.html'))
        ? response()->file(public_path('index.html'))
        : response('Bdzoon API running. Frontend not built yet.', 200);
})->where('any', '.*');
