Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.



Get Started Now!

Class ‘App\Http\Controllers\Student’ not found

LaravelWebsites

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 please follow some easy steps

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

3rd step got your Controller :- StudentController.php

And add model name in the Student Controller class here as like this

use App\Student;

Then refresh your browser and you got solve your errors.

http://127.0.0.1:8000/

Thanks hopefully it will helpful for you. 👍👍

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x