protected function askEmail()
    {
        $email = $this->ask('E-mail');

        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            $this->error("'$email' is not an email address.");
            exit(2);
        } elseif (UserProxy::where('email', $email)->first()) {
            $this->error("User '$email' already exists");
            exit(3);
        }

        return $email;
    }
protected function askEmail()
    {
        $email = $this->ask('E-mail');

        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            $this->error("'$email' is not an email address.");
            exit(2);
        } elseif (UserProxy::where('email', $email)->first()) {
            $this->error("User '$email' already exists");
            exit(3);
        }

        return $email;
    }
protected function askEmail ( ) { $ email = $ this -> ask ( 'E-mail' ) ; if ( ! filter_var ( $ email , FILTER_VALIDATE_EMAIL ) ) { $ this -> error ( "'$email' is not an email address." ) ; exit ( 2 ) ; } elseif ( UserProxy :: where ( 'email' , $ email ) -> first ( ) ) { $ this -> error ( "User '$email' already exists" ) ; exit ( 3 ) ; } return $ email ; }
Asks for and validates E-mail address

@return string
Asks for and validates E - mail address