PHP code example of adoranwodo / laravelcorsmiddleware

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

    

adoranwodo / laravelcorsmiddleware example snippets

 config/app.php 
config/laravelcorsmiddleware.php

php artisan vendor:publish --provider="AdoraNwodo\LaravelCorsMiddleware\LaravelCorsMiddlewareServiceProvider"
app/Http/Kernel.php
app/Http/Kernel.php
laravelcorsmiddleware.php
bootstrap/app.php
bootstrap/app.php
bootstrap/app.php

$app->routeMiddleware([
    'cors' => \AdoraNwodo\LaravelCorsMiddleware\LaravelCorsMiddleware::class
]);