get parameter url drupal 8 code example
Example: drupal 8 get argument from url
$current_path = substr(\Drupal::service('path.current')->getPath(), 1);
$path_args = explode('/', $current_path);
$current_path = substr(\Drupal::service('path.current')->getPath(), 1);
$path_args = explode('/', $current_path);