what is cors in laravel
Cross-Origin Resource Sharing
sharing resources between different sources
what is cors in laravel
Cross-Origin Resource Sharing
sharing resources between different sources
laravel-cors
composer require fruitcake/laravel-cors
Laravel SPA cors
// add a middleware (php artisan make:middleware Cors)
// add in your kernel (\App\Http\Middleware\Cors::class,)
public function handle(Request $request, Closure $next)
{
return $next($request)->header('Access-Control-Allow-Origin', '*')
->header('Access-Control-Allow-Methods','GET, POST, PUT, PATCH, DELETE, OPTIONS')
->header('Access-Control-Allow-Headers','Origin, X-Requested-With, Content-Type, Accept, Authorization');
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us