Support the ongoing development of Laravel.io →
posted 9 years ago
Eloquent
Last updated 1 year ago.
0

Laravel 5 uses namespaces havily. Your User class is in App\User namespace, unless you changed your App namespace, but I doubt it. Add the following before your controller's class declaration:

use App\User;
0

I know I tried that a few times but ... Thanks, it is working for me now. Got to get used to the namespacing

0

Yes, it is worth it. :) Namespacing seems like pain in a** at first, but you will love it soon.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

tpbsv77 tpbsv77 Joined 12 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.