add family logic

This commit is contained in:
root
2026-03-10 17:52:47 -04:00
parent a82f7aedbc
commit 17d73e2f92
37 changed files with 2611 additions and 2 deletions
+5 -2
View File
@@ -2,6 +2,7 @@
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\View\DashboardRedirectController;
use App\Services\Docs\OpenApiRouteExporter;
Route::redirect('/', '/api/docs')->name('docs.home');
Route::view('/api/docs', 'docs.swagger')->name('docs.swagger');
@@ -11,8 +12,10 @@ Route::get('/api/documentation/swagger.json', function () {
$path = resource_path('docs/openapi.json');
abort_unless(is_file($path), 404);
return response()->file($path, [
$spec = app(OpenApiRouteExporter::class)->exportFromFile($path);
return response()->json($spec, 200, [
'Content-Type' => 'application/json',
'Cache-Control' => 'public, max-age=300',
'Cache-Control' => 'no-store, max-age=0',
]);
})->name('docs.swagger-json');