From 504b81b74a05424548b26269a3c0628c7ca3a2ce Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 9 Apr 2022 18:11:09 +0300 Subject: [PATCH] feat(helpers): add `getUriString` helper function --- src/flextype/helpers/urls.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/flextype/helpers/urls.php b/src/flextype/helpers/urls.php index ec41823f..a19bd36e 100644 --- a/src/flextype/helpers/urls.php +++ b/src/flextype/helpers/urls.php @@ -192,6 +192,18 @@ if (! function_exists('getAbsoluteUrl')) { } } +if (! function_exists('getUriString')) { + /** + * Get uri string. + * + * @return string + */ + function getUriString(): string + { + return $_SERVER['REQUEST_URI']; + } +} + if (! function_exists('redirect')) { /** * Redirect.