zdk/laravel-cors

1.0.1 2020-03-11 10:15 UTC

This package is not auto-updated.

Last update: 2024-09-25 05:31:07 UTC


README

用途

跨域访问的laravel组件

要求

  1. PHP >= 7.1
  2. Composer

安装

$ composer require zdk/laravel-cors

生成配置文件

php artisan vendor:publish --provider="Zdk\Cors\ServiceProvider"

###Usage 添加到全局路由中

  protected $middleware = [
          \App\Http\Middleware\TrustProxies::class,
          ........,
          HandleCors::class
  ];

###配置项参数