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:
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??
You should be able to redirect to the url like this
You can read about Redirects in the Laravel docs here.
You can use
Redirect::away($url)
For Laravel 5.x use:
as stated in the docs:
Also, adding class
and after, like this:
or -
For external links have to be used full URL string with 'http' in begin.
Define the url you want to redirect in
$url
Then just use
If you want to redirect inside your views use
Read more about Redirect here
Update 1 :
Here is the simple example
Update 2 :
As the Questioner wants to return in the same page
For Laravel 5.x we can redirect with just