zdk/laravel-cors

1.0.1 2020-03-11 10:15 UTC

This package is not auto-updated.

Last update: 2024-11-06 06:04:38 UTC


README

用途

跨域访问的laravel组件

Requirement

  1. PHP >= 7.1
  2. 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
  ];

###配置项参数