Answer the question
In order to leave comments, you need to log in
How to get object from model and get its properties?
There is a users table with data entered for the test. Now I'm trying to get the user I need by email and password -
$user = User::where(['password' => 'xxxxxx', 'email => '[email protected]']);
Answer the question
In order to leave comments, you need to log in
where() returns a query constructor object, the query itself has yet to be executed. Usually this is done via ->get() , but in this case it's better like this:
Well, in general, authentication is done like this .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question