PHP code example of coolephp / cors
1. Go to this page and download the library: Download coolephp/cors library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
coolephp / cors example snippets
php
return [
/*
* App 名称
*/
'name' => env('APP_NAME', 'Coole'),
/*
* 全局中间件
*/
'middleware' => [
...
\Coole\Cors\Cors::class
...
],
];