Skip to content

Commit 4fc9369

Browse files
committed
feat: add urlData method
1 parent 4e761f0 commit 4fc9369

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Request.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,17 @@ public static function rawData($item = null, $default = null)
178178
return \Leaf\Anchor::deepGet($data, $item) ?? $default;
179179
}
180180

181+
/**
182+
* Return only get request data
183+
*
184+
* @param string|array $item The items to output
185+
* @param mixed $default The default value to return if no data is available
186+
*/
187+
public static function urlData($item = null, $default = null)
188+
{
189+
return \Leaf\Anchor::deepGet($_GET, $item) ?? $default;
190+
}
191+
181192
/**
182193
* Returns request data
183194
*

0 commit comments

Comments
 (0)