I'm new to Laravel. I started working on Laravel 7 a week ago, built an API and everything is working fine. I attempted to recreate the same API with Laravel 8 but my api routes don't seem to be working anymore. I get an error that says:
"Illuminate\Contracts\Container\BindingResolutionException Target class [UserController] does not exist."
I have defined api routes like so: Route::resource('users', 'UserController', ['except' => ['create', 'edit']]);