laravel-cors maintained by zdk
用途
跨域访问的laravel组件
Requirement
- PHP >= 7.1
- Composer
Installation
$ composer require zdk/laravel-cors
生成配置文件
php artisan vendor:publish --provider="Zdk\Cors\ServiceProvider"
###Usage 添加到全局路由中
protected $middleware = [
\App\Http\Middleware\TrustProxies::class,
........,
HandleCors::class
];
###配置项参数