重定向到外部URL,并在laravel中返回 [英] Redirect to external URL with return in laravel

查看:89
本文介绍了重定向到外部URL,并在laravel中返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用SMS INDIA HUB API向用户发送一次密码. 为此,我需要重定向到URL格式:

I am trying to send one time password to a user using SMS INDIA HUB API. For that purpose I need to redirect to a URL format:

如果我们加载此URL,它将返回一些消息.我需要收到该消息.

If we load this URL, it will return some message. I need to get that message to.

我尝试过这样

$url = "http://cloud.smsindiahub.in/vendorsms/pushsms.aspx?user=wwww&password=eee&msisdn=9197xxxxx&sid=yyyyy&msg=rrrrr&fl=0&gwid=2";

return Redirect::intended($url);

但是它没有指向该链接.它将尝试将该URL加载到localhost中.

But it is not directing to that link. It tries to load that URL in localhost.

或者是否有任何插件可以使用SMS INDIA HUB发送短信?

Or is there any plugin to send sms using SMS INDIA HUB?

任何人都可以帮忙吗?

推荐答案

您应该能够像这样重定向到网址

You should be able to redirect to the url like this

return Redirect::to($url);

您可以在此处的Laravel文档中阅读有关重定向的信息.

这篇关于重定向到外部URL,并在laravel中返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆