我不知道在laravel中会发生什么。它没有使用php中的Header位置。
$d = "http://www.google.com";
header('Location: '.$d);
如果我在本地使用重定向::到(),则不会发生任何事情。我是否需要先在laravel 5.2中设置一些东西?
答案 0 :(得分:3)
Laravel 5.2 。你应该这样做
UITapGestureRecognizer *buyNowTapped = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(buyNowClicked:)];
buyNowTapped.numberOfTapsRequired = 1.0;
cell.buy.tag = indexPath.row;
cell.buy.userInteractionEnabled = YES;
[cell.buy addGestureRecognizer:buyNowTapped];
-(void)buyNowClicked : (id)sender
{
UIButton *button;
UILabel *label;
if([sender isKindOfClass:[UIButton class]])
{
button = (UIButton *)sender;
[self buyService:button.tag];
}
else if ([sender isKindOfClass:[UILabel class]])
{
label = (UILabel *)sender;
[self buyService:label.tag];
}
}
或强>
redirect()->to('url')->send();
答案 1 :(得分:0)
检查此方法:
return redirect()->to('url');