From 828b6b9620eb250c7348bd8e664a179bbee99b9f Mon Sep 17 00:00:00 2001 From: Daniyal Javani Date: Tue, 14 Jul 2020 12:34:44 +0430 Subject: [PATCH] fix getTargetUrl --- src/RedirectionForm.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/RedirectionForm.php b/src/RedirectionForm.php index 4d0c4a2e..8479f20d 100644 --- a/src/RedirectionForm.php +++ b/src/RedirectionForm.php @@ -174,6 +174,16 @@ public function render() : string return call_user_func_array($renderer, $data); } + /** + * Returns the target URL. + * + * @return string target URL + */ + public function getTargetUrl(): string + { + return $this->getAction() . '?' . http_build_query($this->getInputs()); + } + /** * Retrieve JSON format of redirection form. *