Download the PHP package spatie/query-string without Composer
On this page you can find all versions of the php package spatie/query-string. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spatie/query-string
More information about spatie/query-string
Files in spatie/query-string
Package query-string
Short Description Manipulate query strings
License MIT
Homepage https://github.com/spatie/query-string
Informations about the package query-string
QueryString
Work with query strings
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
You can install the package via composer:
Usage
Toggle parameters
A single toggle
Toggle a value
Toggle multiple values
Filter
Filtering the query string will use the JSON API filter syntax.
Sort
Sorting the query string will use the JSON API sort syntax. At the moment only single sorts are supported.
Pagination
There's built-in support for pagination:
Note that changing any other value on the query string, will reset the page too.
Other useful methods
Base URL
Casting a QueryString
to a string will generate the URL.
You can choose to use a different base URL like so:
Clear a parameter
Active parameter or not
Laravel support
A separate Laravel package will be added in the future. The Laravel package will use this one under the hood and implement the JSON API spec.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you've found a bug regarding security please mail [email protected] instead of using the issue tracker.
Postcardware
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.
We publish all received postcards on our company website.
Credits
- Brent Roose
- All Contributors
License
The MIT License (MIT). Please see License File for more information.