Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Cors Laravel Package

fruitcake/php-cors

Standalone PHP CORS library and Symfony HttpFoundation middleware implementing the W3C CORS spec. Configure allowed origins, methods, headers, exposed headers, and max-age; supports regex origin patterns. Used by Stack and Laravel integrations.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs Buy: Eliminates need for custom CORS implementation, avoiding security vulnerabilities and maintenance overhead. Proven solution with 100% test coverage and strict type checks reduces technical debt.
  • Feature Implementation: Enables rapid configuration of cross-origin policies for SPAs (React/Vue), mobile apps, or third-party integrations without reinventing standard headers (e.g., Access-Control-Allow-Origin).
  • Roadmap Alignment: Future-proofs projects via active maintenance for modern PHP (8.2–8.5) and Symfony (up to v8), ensuring compatibility with evolving web standards and infrastructure.

When to Consider This Package

  • Adopt when: Building Symfony/Laravel applications requiring dynamic CORS control (e.g., multi-domain frontends, API gateways), or needing a standards-compliant, well-tested library for custom middleware. Ideal for teams prioritizing security, compliance, and minimal configuration overhead.
  • Look elsewhere if: Using non-PHP stacks, relying solely on server-level CORS (Nginx/Apache), or for trivial use cases where basic server configuration suffices (e.g., single-domain static sites).

How to Pitch It (Stakeholders)

For executives: "This package eliminates CORS-related security risks and compliance gaps while reducing engineering effort. With 100% test coverage and active maintenance for modern PHP/Symfony versions, it ensures our APIs reliably support cross-origin requests for SPAs and third-party integrations without custom development—saving time and mitigating vulnerability exposure." For engineering: "It provides a battle-tested, standards-compliant CORS implementation that integrates seamlessly with Laravel/Symfony via a simple configuration layer. Handles all edge cases (preflight requests, credentials, dynamic origins) with zero maintenance burden—freeing your team to focus on core features."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport