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/pushs
For Laravel 5.x we can redirect with just
return redirect()->to($url);
Also, adding class
use Illuminate\Http\RedirectResponse;
and after, like this:
public function show($id){
$link = Link::findOrFail($id); // get data from db table Links
return new RedirectResponse($link->url); // and this my external link,
}
or -
return new RedirectResponse("http://www.google.com?andParams=yourParams");
For external links have to be used full URL string with 'http' in begin.