$current_path = \Drupal::service('path.current')->getPath();
Ref: https://stefvanlooveren.me/blog/get-current-url-path-alias-drupal-8-9
$current_path = \Drupal::service('path.current')->getPath();
Ref: https://stefvanlooveren.me/blog/get-current-url-path-alias-drupal-8-9
Leave a comment