spatie/laravel-cors
Adds configurable CORS support to Laravel/Lumen: sets CORS headers on responses, handles preflight requests, and lets you define allowed origins, methods, headers, and credentials via middleware and config. Abandoned since Laravel 7+ has native CORS support.
fruitcake/laravel-cors (active maintenance).For Executives: "This package resolves CORS compliance for our Laravel 6 API with zero licensing cost and minimal dev effort. By adopting it, we avoid reinventing the wheel, reduce security risks, and future-proof our migration to Laravel 7’s native CORS. A low-risk, high-impact fix for legacy systems."
For Engineering:
"For Laravel 6 or below, spatie/laravel-cors provides a battle-tested, configurable CORS middleware (preflight support, custom origins) with zero maintenance overhead. It’s a drop-in solution—install, configure, and forget. Critical caveat: Only use this for legacy systems; Laravel 7+ has built-in CORS. For new projects, leverage native features or active alternatives like fruitcake/laravel-cors."
How can I help you explore Laravel packages today?