Closed Nereg closed 4 years ago
Any guesses ?
That's to find a User by credentials, it's not designed to perform regular searches on such fields, unless you define those fields to be used as credentials..
You need to either use the User model or the User repository:
Something like
$user = Sentinel::getUserRepository()->createModel()->where('first_name', $firstName)->firstOrFail();
After the createModel()
call is all Laravel Eloquent, so you can perform any kind of query with it.
Hello ! I want to search for user by user's first name or any column . First I tryed code like this :
but every time I got just null even when in DB is user with that value of
last_name
! Please help !