drupal 8 get query parameters from url code example
Example: drupal 8 get url query parameters
// URL query parameter.
\Drupal::request()->query->get('keys');
\Drupal::request()->query->all()
// URL query parameter.
\Drupal::request()->query->get('keys');
\Drupal::request()->query->all()