Skip to main content
Invalid link removed and updated with valid link
Source Link

I didn't work in drupal 8 yet but as per the documentation drupal_goto is removed from Drupal 8.

In place of drupal_goto you need to write:

return new RedirectResponse(\Drupal::url('route.name'));

and something like this with parameters :

return new RedirectResponse(\Drupal::url('route.name', [], ['absolute' => TRUE]));

Check here https://www.drupal.org/node/2023537 and class RedirectResponseclass RedirectResponse

I didn't work in drupal 8 yet but as per the documentation drupal_goto is removed from Drupal 8.

In place of drupal_goto you need to write:

return new RedirectResponse(\Drupal::url('route.name'));

and something like this with parameters :

return new RedirectResponse(\Drupal::url('route.name', [], ['absolute' => TRUE]));

Check here https://www.drupal.org/node/2023537 and class RedirectResponse

I didn't work in drupal 8 yet but as per the documentation drupal_goto is removed from Drupal 8.

In place of drupal_goto you need to write:

return new RedirectResponse(\Drupal::url('route.name'));

and something like this with parameters :

return new RedirectResponse(\Drupal::url('route.name', [], ['absolute' => TRUE]));

Check here https://www.drupal.org/node/2023537 and class RedirectResponse

Source Link
Sumit Madan
  • 3.5k
  • 2
  • 28
  • 53

I didn't work in drupal 8 yet but as per the documentation drupal_goto is removed from Drupal 8.

In place of drupal_goto you need to write:

return new RedirectResponse(\Drupal::url('route.name'));

and something like this with parameters :

return new RedirectResponse(\Drupal::url('route.name', [], ['absolute' => TRUE]));

Check here https://www.drupal.org/node/2023537 and class RedirectResponse