Laravel 8 already has CORS Support built in - HandleCors middleware is defined in your global middleware stack by default and can be configured in your application's config/cors.php config file.
To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS