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 进行继承

LARAVEL 从多个表中获取重复的行

Laravel Horizo​​n 限制与优化

Laravel:如何在 laravel 查询生成器中使用派生表/子查询

Laravel 5在blade中 echo 包含html的会话变量

Heroku 上的 Laravel 队列工作者

将 Laravel MYSQL 更改为 utf8mb4 以在现有数据库中支持表情符号

Laravel 监听器监听多个事件

在 Laravel 中无效后防止重定向到主页

在 laravel 5.2 中禁用特定路由的 Web 中间件

laravel 5中的配置缓存导致找不到视图

使用 ModelNotFoundException

未定义的类常量App\Providers\RouteServiceProvider::HOME

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

如何在 Laravel 中实现数组类型路由?

脚本 php artisan clear-compiled 处理 pre-update-cmd 事件返回错误(Laravel 4.1 升级)

Laravel 5.4 - Mix - 如何运行浏览器实时重新加载

遍历 Laravel 控制器中的结果集

判断行是否存在,Laravel

Laravel 将附加参数传递给函数