Skip to content

[12.x] Document static routes - backport#11215

Draft
DGarbs51 wants to merge 2 commits into
12.xfrom
add-static-route-docs-12.x
Draft

[12.x] Document static routes - backport#11215
DGarbs51 wants to merge 2 commits into
12.xfrom
add-static-route-docs-12.x

Conversation

@DGarbs51
Copy link
Copy Markdown

@DGarbs51 DGarbs51 commented May 27, 2026

Summary

Backports the Route::static() documentation from the Laravel 13.x docs PR to Laravel 12.x.

The new routing.md section covers:

  • basic ->static() usage with shared and browser TTL overrides,
  • default config/cache.php options,
  • response and middleware behavior,
  • when not to use static routes,
  • Inertia behavior,
  • Livewire compatibility,
  • the CDN / Cloudflare Cache Rule caveat.

Backport Notes

The Laravel 13.x docs use Illuminate\Foundation\Http\Middleware\PreventRequestForgery in the default config example. Laravel 12.x uses Illuminate\Foundation\Http\Middleware\ValidateCsrfToken, so this backport adjusts the example accordingly.

Related PRs

Compatibility Verification

The framework backport PR includes app-level matrix verification across PHP 8.4 / 8.5, Inertia 1 / 2 / 3, and Livewire 3 / 4 for Laravel 12.x where Composer constraints permit those combinations.

Testing

Documentation-only change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant