Registry / web-framework / spatie-laravel-cors

spatie-laravel-cors

JSON →
library1.7.0phppackagistunverified

Send CORS headers in a Laravel or Lumen application.

composer require spatie/laravel-cors
INSTALL
IMPORT
SIG · SPATIE-LARAVEL-COR
S
spatie-laravel-cors
web-frameworkphpv1.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CorsServiceProvider
use Spatie\Cors\CorsServiceProvider;

Register the CORS service provider and publish configuration.

// In config/app.php providers array: Spatie\Cors\CorsServiceProvider::class, // Then publish config: php artisan vendor:publish --provider="Spatie\Cors\CorsServiceProvider"
Debug
Known issues
gotchaMay conflict with other CORS middleware if not configured properly.
fix
Ensure only one CORS middleware is active; disable Laravel's built-in CORS if using this package.
affects: >=1.0.0
Upgrade
Version history
1.7.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
spatie-laravel-cors — pip install spatie-laravel-cors · libregistry