where('token', $token); } public function scopeByEmail($query, $email) { return $query->where('email', $email); } }