In this tutorial I’m going to describe how to solve “Class ‘App\Http\Controllers\Student’ not found” if you got this types of error.
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2024/02/image-78.png)
1step this types of error is showing when you’re not using class name whatever you have define below code as like :-
public function index()
{
$students = Student::all();
return view(‘students.dashboard’,compact(‘student’));
}
2nd you have to add your model name above of the StudenController class name
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2024/02/image-79.png)
3rd step got your Controller :- StudentController.php
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2024/02/image-80.png)
And add model name in the Student Controller class here as like this
use App\Student;
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2024/02/image-81.png)
Then refresh your browser and you got solve your errors.
http://127.0.0.1:8000/
![](https://www.devopsfreelancer.com/blog/wp-content/uploads/2024/02/image-82.png)