public function verify($username, $password) { $credentials = ['email' => $username, 'password' => $password]; $valid = Auth::validate($credentials); if ($valid) { return Auth::getProvider()->retrieveByCredentials($credentials)->id; } return false; }