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:

http://cloud.smsindiahub.in/vendorsms/pushsms.aspx?user=abc&password=xyz&msisdn=919898xxxxxx&sid=SenderId&msg=test%20message&fl=0&gwid=2

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

I tried like this

$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);

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

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

Can anyone help??

推荐答案

你应该可以像这样重定向到url

return Redirect::to($url);

You can read about Redirects in the Laravel docs here.

Laravel相关问答推荐

为什么Laravel在API请求时返回BadMethodCallException?

如何在 Laravel 中使用多对一变形关系

API GET 请求得到与数据库记录不同的结果

Laravel 5 将错误发送到Electron邮件

Laravel 5 控制台( artisan )命令单元测试

将 Laravel 升级到 4.2 后,Artisan::call('migrate') 不起作用

Laravel:如何通过 id 从集合中删除项目

带有 Laravel Passport 的 SSO

如何在 Laravel 5.5 中扩展 vendor 包服务提供者

带有时间戳的 Laravel 5.1 eloquent::attach() 方法

如何在 laravel blade中进行一次性推送

在 Laravel 中将 Public 添加到assets资源路径

在共享主机中仅使用 FTP 部署 Laravel 5

Laravel:验证 json 对象

Laravel Mail 发送Electron邮件但返回 false

Laravel Passport 通过访问令牌获取客户端 ID

Laravel 在保存前生成 slug

Laravel 5 - 从控制器级别的所有请求对象中删除参数

Laravel 4:分析器在哪里?

没有Access-Control-Allow-Origin标头 - Laravel