Create amazing web applications!

Solution for Target class [] does not exist in Laravel

In this article, we are going to solve the issue with regard to the target class that does not exist in laravel, Lets code pare.

by Anthony Pillos 1 minute

quick-solution class does not exist laravel

Solution for Target class [] does not exist in Laravel

In some cases, when you're creating a new laravel application or copying old code to a fresh laravel application we tend to encounter some issue with regards to Target class [] does not exist.

Even though, we know to our self that our code doesn't have any problem at all.

So why we encounter this kind of error?

To the Rescue

For today, I'll show you how to fix this kind of error in just one line of code.

Error:

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

Illuminate\Container\Container::build
vendor/laravel/framework/src/Illuminate/Container/Container.php:807

Solution:

  1. Open your favorite command-line tools and go to the root path of your laravel code and type this code.
php artisan config:cache

Voila

Then try to refresh your page. It should fixed your problem. Cheers.

Wait just wait

Browse Laravel Tutorial

Read all laravel tutorials from beginner to advanced. Explore Laravel Tutorials

Voila!!!

I hope you enjoy our tutorial, Let me know incase you encounter any error I would love to answer that. Don't forget to subscribe to my Youtube Channel at Let's Code Pare - Youtube Channel

Buy Me A Coffee

Share Now

Want to get more 🔥 tips like this one?

Subscribe to get notified for our new dev tutorials

Let's Code Pare
Let's Code Pare Youtube Channel