Question : drupal 8 get url query parameters
Answered by : gleaming-gannet-htlwomz3dthc
// URL query parameter.
\Drupal::request()->query->get('keys');
\Drupal::request()->query->all()
Source : | Last Update : Fri, 25 Sep 20
Question : drupal 8 get argument from url
Answered by : gleaming-gannet-htlwomz3dthc
$current_path = ltrim(\Drupal::service('path.current')->getPath(), '/');
$path_args = explode('/', $current_path);
Source : | Last Update : Thu, 12 Nov 20