Lesson 11/34 · 6:24 min
Full repository for this course
Hi Pavilas, thanks for great content. I wonder why is it required to make a change (below)? - I am using Laravel 10 at the moment, if that makes any difference. Thanks in advance.
User::where('email', $request->email)->first()
To
\App\Models\User::where('email', $request->email)->first();
It's just the difference if you load use App\Models\User; on top or not. If not, then you need to specify the full name like in your second example.
use App\Models\User;
Hi Pavilas, thanks for great content. I wonder why is it required to make a change (below)? - I am using Laravel 10 at the moment, if that makes any difference. Thanks in advance.
To
It's just the difference if you load
use App\Models\User;
on top or not. If not, then you need to specify the full name like in your second example.