Target class [App\Http\Controllers\UserController] does not exist, Laravel 1


Target class [App\Http\Controllers\UserController] does not exist, Laravel

 

Solution : 

1. Check if you have created a controller with such a name.

2. If you have created such a controller, then check the spelling where it is defined.

 

class UserController extends Controller

{

    // write your code here

}

If an issue still exists, rename or delete the existing controller and create a new controller by the following line on the terminal:

 

php atisan make:controller controllerName