mirror of
https://github.com/flextype/flextype.git
synced 2025-08-06 21:26:48 +02:00
feat(helpers): add collectionFromQueryString
helper
This commit is contained in:
@@ -69,6 +69,20 @@ if (! function_exists('collectionWithRange')) {
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('collectionFromQueryString')) {
|
||||
/**
|
||||
* Create a new arrayable object from the given query string.
|
||||
*
|
||||
* @param string $string Input query string.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
function collectionFromQueryString(string $string): Collection
|
||||
{
|
||||
return Collection::createFromQueryString($string);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('filterCollection')) {
|
||||
/**
|
||||
* Filter collection.
|
||||
|
Reference in New Issue
Block a user