PHP code example of palanik / lumen-cors
1. Go to this page and download the library: Download palanik/lumen-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/ */
palanik / lumen-cors example snippets
$app->routeMiddleware([
'cors' => 'palanik\lumen\Middleware\LumenCors',
]);
$app->get('/data', ['middleware' => 'cors', function() {
//
}]);