user3770963
user3770963

Reputation: 47

Class Illuminate\Support\Facades\RateLimiter not found

I've created my laravel project as follows:

laravel new my_app

This creates my project using laravel version 8. As I want to use Laravel 7, I modified composer.json:

 "laravel/framework": "^7.0",

After that I run:

composer update

which ends with the error described (Class Illuminate\Support\Facades\RateLimiter not found )

In fact, that class doesn't exist in Support facade. Shouldn't downgrade process correct this?

Upvotes: 2

Views: 9146

Answers (1)

lagbox
lagbox

Reputation: 50481

No, this is from code in your application; specifically your App\Providers\RouteServiceProvider. Everything that isn't in vendor is considered your application and is not touched by any upgrade or downgrade. The laravel/laravel package only sets up your application skeleton for you. You can install Laravel 7 specifically with composer create-project --prefer-dist laravel/laravel:^7.0 yourproject; you can find the instructions in the install guide for Laravel 7.

Otherwise you will need to potentially copy the Service Providers from laravel/laravel version 7 into your application so you are not using providers from Laravel 8 as some things have changed and some new features were introduced. And there would be other changes as well.

Laravel 7.x Docs - Installation - via Composer Create-Project composer create-project

Upvotes: 5

Related Questions