drupal 8 get full current url with parameters 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);