Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialGiles Sandoval
1,814 PointsGetting this Error when I try to refresh. Class 'App\Course' not found
Using Laravel version 8.7.1, I followed the video and typed in "use App\Course" in AppController.php file.
1 Answer
Giles Sandoval
1,814 PointsFigured it out. When I was in tinker using the "Course::all();" command.
It showed me "Aliasing 'Course' to 'App\Models\Course' for this Tinker session."
So I used this in the AppController.php file: use App\Models\Course;
And it worked after that.