Yes, it is okay to remove the fruitcake/laravel-cors package from composer.json while upgrading to Laravel 10. Laravel 10 has built-in CORS support, so there is no need for this package anymore.
However, if your application relies on the functionality provided by fruitcake/laravel-cors, you may need to find an alternative solution or implement the functionality yourself using Laravel's built-in CORS support.
To remove the package, simply delete the line "fruitcake/laravel-cors": "^2.0" from the require section of your composer.json file and run composer update.
{
"require": {
"php": "^8.0",
"laravel/framework": "^10.0",
// remove the following line
"fruitcake/laravel-cors": "^2.0"
},
// ...
}