PHP code example of gilsonsouza / lara-cors

1. Go to this page and download the library: Download gilsonsouza/lara-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/ */

    

gilsonsouza / lara-cors example snippets


 protected $middleware = [
        // other middleware ommited
    	\LaraCors\Cors\CorsMiddleware::class,
 ];

// file START ommited
    'providers' => [
        // other providers ommited
        \LaraCors\Cors\CorsServiceProvider::class,
    ],
// file END ommited
shell
php artisan vendor:publish  --provider="LaraCors\Cors\CorsServiceProvider"