首页 > drupal8怎么redirect到另一个页面上?

drupal8怎么redirect到另一个页面上?

例如我想跳到地址/projects?field_name=xxx,使用D8的API应该怎么写?
D7用drupal_goto就可以了,但drupal8需要知道route name,我又不知道VIEWS的route name是什么。


找到答案了

use Symfony\Component\HttpFoundation\RedirectResponse;

$response = new RedirectResponse('user/login');
$response->send();
【热门文章】
【热门文章】