Shift with red gradient lettering

Target class [bindings] does not exist.

Illuminate\Contracts\Container\BindingResolutionException: Target class [bindings] does not exist.


Previous versions of Laravel registered a bindings middleware in the HTTP Kernel api group. Starting with Laravel 8, this middleware is registered by its class name using a static class constant instead of a string.


While this change is automated by the Laravel 8.x Shift, if you upgraded manually or have other references within your application, you may still have string references to the bindings middleware.

To resolve this error, change any string references from bindings to \Illuminate\Routing\Middleware\SubstituteBindings::class in your app/Http/Kernel.php. While uncommon, be sure to replace this for any additional references to this middleware within your application as well.

← Back to the knowledge base

Did this solve the error? Give us a shout out on Twitter. If not, email support for help.

Sign in with any of the following services to connect Shift with your Laravel project.

Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.