Laravel is not redirecting to an returned external url.
public function main ($status,$projectid,$respid,$country) {
//Store the passed-in URL parameters to private properties
$this->status = $status;
$this->projectid = $projectid;
$this->respid = $respid;
$this->country = $country;
//Run the starting function
if ($this->verifyId()) {
$this->getLinks();
$this->storeData();
$this->prjUpdate();
$this->redirect();
}
}
public function redirect () {
//Redirect to the set redirect links
if ($this->status === "Complete")
{
return redirect()->away('http://google.com', 302);
} elseif ($this->status === "Incomplete")
{
return redirect()->away('http://google.com');
} elseif ($this->status === "Quotafull")
{
return redirect()->away('http://google.com');
}
}
The $this->redirect() is not redirecting to the set URL return redirect()->away('http://google.com', 302); but when I do var_dump($this->redirect()); it works. If var_dump() is removed it doesn't redirect.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire