public function getCredentials(Request $request)
    {
        $post = json_decode($request->getContent(), true);

        return new CredentialEmailModel($post[self::EMAIL_FIELD], $post[self::PASSWORD_FIELD]);
    }
public function getCredentials(Request $request)
    {
        $post = json_decode($request->getContent(), true);

        return new CredentialEmailModel($post[self::EMAIL_FIELD], $post[self::PASSWORD_FIELD]);
    }
public function getCredentials ( Request $ request ) { $ post = json_decode ( $ request -> getContent ( ) , true ) ; return new CredentialEmailModel ( $ post [ self :: EMAIL_FIELD ] , $ post [ self :: PASSWORD_FIELD ] ) ; }
2) Returns CredentialEmailModel

@param Request $request
@return CredentialEmailModel
2 ) Returns CredentialEmailModel