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

Laravel Cors Laravel Package

fruitcake/laravel-cors

Laravel middleware to handle Cross-Origin Resource Sharing (CORS). Configure allowed origins, methods, headers, credentials, and exposed headers via a config file. Adds proper CORS response headers and supports preflight OPTIONS requests for APIs and SPAs.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

This package enables secure, standards-compliant cross-origin requests for Laravel APIs, eliminating the need for custom middleware implementation. It directly supports decisions to prioritize API security and third-party integrations (e.g., SPAs, mobile apps, or partner services) without reinventing the wheel. As a battle-tested solution with 6k+ stars, it validates the "buy vs build" choice for CORS management—reducing development time, minimizing misconfiguration risks, and ensuring compliance with modern web security requirements. For roadmaps involving public-facing APIs or multi-domain client ecosystems, this package accelerates time-to-market while maintaining strict origin control through configurable allowlists, patterns, and headers.

When to Consider This Package

Adopt this package when using Laravel 6–9 with PHP 7.4/8.0+ and needing a simple, configurable CORS solution for standard use cases (e.g., whitelisting domains, handling preflight requests). It’s ideal for projects prioritizing stability over cutting-edge features, given its maturity and widespread adoption. Look elsewhere only if: (1) your Laravel version exceeds 9 (though composer.json shows compatibility up to Laravel 9), (2) you require highly specialized CORS behaviors unsupported by its config-driven approach, or (3) active maintenance is non-negotiable (though its archived status reflects stability rather than obsolescence—core functionality hasn’t needed updates in years). Avoid if your team lacks confidence in open-source dependencies or needs real-time support for emerging browser standards.

How to Pitch It (Stake

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