Skip to content
Advertisement

why I get spatie/laravel-cors[1.2.0, …, 1.2.2] require illuminate/support 5.5.*|5.6.* when i run composer require spatie/laravel-cors

Facing this issue After I Upgraded project from Laravel 6 to Laravel 7. I actually could not upgrade laravel/framework package from 6 to 7 due to some other error of spatie/laravel-cors but than I removed spatie/laravel-cors and upgraded laravel/framework, after upgrading it wont install again. here is full error:

**Problem 1
    - spatie/laravel-cors[1.2.0, ..., 1.2.2] require illuminate/support 5.5.*|5.6.* -> found illuminate/support[v5.5.0, ..., v5.6.39] but it conflicts with another require.
    - spatie/laravel-cors[1.2.3, ..., 1.3.1] require laravel/framework 5.5.*|5.6.*|5.7.* -> found laravel/framework[v5.5.0, ..., v5.7.29] but it conflicts with your root composer.json require (^7.0).
    - spatie/laravel-cors 1.3.2 requires illuminate/support 5.5.*|5.6.*|5.7.* -> found illuminate/support[v5.5.0, ..., v5.7.28] but it conflicts with another require.
    - spatie/laravel-cors[1.3.3, ..., 1.5.2] require illuminate/support 5.5.*|5.6.*|5.7.*|5.8.* -> found illuminate/support[v5.5.0, ..., v5.8.36] but it conflicts with another require.
    - spatie/laravel-cors 1.6.0 requires illuminate/support 5.5.*|5.6.*|5.7.*|5.8.*|^6.0 -> found illuminate/support[v5.5.0, ..., v5.8.36, v6.0.0, ..., v6.20.17] but it conflicts with another require.
    - Root composer.json requires spatie/laravel-cors ^1.2 -> satisfiable by spatie/laravel-cors[1.2.0, ..., 1.6.0].**

Advertisement

Answer

On the github page of the Spatie/Laravel-cors you can find this message:

We have abandoned this package because Laravel 7 introduced native support for CORS. Only use this package if you’re on Laravel 6 or below.

Why do you still need this package?

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement