<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\BilinggoApiController;

// Frontend Routes
Route::get('/', function () {
    return file_get_contents(public_path('index.html'));
});

Route::get('/admin.html', function () {
    return file_get_contents(public_path('admin.html'));
});

// API Routes (acting as drop-in replacement for pure PHP files)
Route::any('/api/auth.php', [BilinggoApiController::class, 'auth']);
Route::any('/api/auth', [BilinggoApiController::class, 'auth']);
Route::any('/api/products.php', [BilinggoApiController::class, 'products']);
Route::any('/api/products', [BilinggoApiController::class, 'products']);
Route::any('/api/orders.php', [BilinggoApiController::class, 'orders']);
Route::any('/api/orders', [BilinggoApiController::class, 'orders']);
Route::any('/api/registrations.php', [BilinggoApiController::class, 'registrations']);
Route::any('/api/registrations', [BilinggoApiController::class, 'registrations']);
Route::any('/api/slides.php', [BilinggoApiController::class, 'slides']);
Route::any('/api/slides', [BilinggoApiController::class, 'slides']);
Route::any('/api/sessions.php', [BilinggoApiController::class, 'sessions']);
Route::any('/api/sessions', [BilinggoApiController::class, 'sessions']);
Route::any('/api/topics.php', [BilinggoApiController::class, 'topics']);
Route::any('/api/topics', [BilinggoApiController::class, 'topics']);
Route::any('/api/news.php', [BilinggoApiController::class, 'news']);
Route::any('/api/news', [BilinggoApiController::class, 'news']);
Route::any('/api/settings.php', [BilinggoApiController::class, 'settings']);
Route::any('/api/settings', [BilinggoApiController::class, 'settings']);
