laravel select where and where condition
eloquent, laravel, laravel-4
Solution
$this->where('email', $email)->where('password', $password)
is returning a Builder object which you could use to append more where filters etc.
To get the result you need:
$userRecord = $this->where('email', $email)->where('password', $password)->first();
Problem
I have this basic query i want to perform but an error keeps coming up. Probably due to my newness to laravel. here is the code: ``` $userRecord = $this->where('email', $email)->where('password', $password); echo "first name: " . $userRecord->email; ``` I am trying to get the user record matching the credentials where email AND password are a match. This is throwing an error: Undefined property: Illuminate\Database\Eloquent\Builder::$email I've checked the email and password being passed to the function, and they are holding values. what is the problem here? Thanks,