2025-06-29 08:50:03 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Route;
|
2025-06-29 17:24:35 +02:00
|
|
|
|
2025-08-02 15:28:38 +02:00
|
|
|
/*
|
2025-08-04 22:10:30 +02:00
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Web Routes
|
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
| Note: This Laravel backend now serves as an API for a separate React frontend.
|
|
|
|
|
| All UI routes are handled by the React application.
|
|
|
|
|
|
|
|
|
|
|
*/
|
2025-07-05 02:19:59 +02:00
|
|
|
|
2025-08-04 22:10:30 +02:00
|
|
|
// Simple API health check route
|
|
|
|
|
Route::get('/health', function () {
|
|
|
|
|
return response()->json(['status' => 'ok', 'service' => 'FFR API Backend']);
|
|
|
|
|
});
|
2025-07-05 18:26:04 +02:00
|
|
|
|
2025-08-04 22:10:30 +02:00
|
|
|
// For any unmatched routes, return a JSON response indicating this is an API backend
|
|
|
|
|
Route::fallback(function () {
|
|
|
|
|
return response()->json([
|
|
|
|
|
'message' => 'This is the FFR API backend. Use /api/v1/* endpoints or check the React frontend.',
|
|
|
|
|
'api_base' => '/api/v1'
|
|
|
|
|
], 404);
|
|
|
|
|
});
|