laravel-cors
laravel-cors copied to clipboard
Class Fruitcake\Cors\HandleCors does not exist
I get this error. My project is on godaddy shared server. I deleted barryvdh/laravel-cors, earlier cors package, then uploaded fruitcake one. Deleted old service providers and followed the installation guide but get this error.. Any solution for this?
@mecjos shouldn't it be \Fruitcake\Cors\HandleCors::class
?
this works for me
$app->middleware([
\Fruitcake\Cors\HandleCors::class,
]);
This issue come with laravel 7
I solve this issue first remove package and http -> kernel.php file
commented
protected $middlewire=[
//\Fruitcake\Cors\HandleCors::class,
]
In my case, I was able to resolve the issue by clearing my cache, config and optimizing the app.
My app runs on Laravel v8
Commands:
php artisan config:cache
php artisan cache:clear
php artisan optimize:clear
Delete line 18 containing \Fruitcake\Cors\HandleCors::class,
Located in the following path: app/Http/kernel.php
to become
good job so beautiful keep going