flynn314/allow-cors

2.0.1 2023-04-17 12:53 UTC

This package is auto-updated.

Last update: 2024-11-17 16:15:56 UTC


README

# 1. add to Kernel.php
'cors.allow' => AllowCors::class,

# 2. add middleware to route
Route::middleware(['cors.allow'])->group(function () {
    Route::get('/my-api-call', 'Controller@index');
});