-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URI #53731
URI #53731
Conversation
This looks awesome! 🎉 |
Awesome! Thanks to @stevebauman for your pioneer work in #53370 🎉 👏🏻 |
Tbh the API seems really smooth and making it Love that you've chosen to go the immutable path using withers. Maybe it's worth adding the One more thing that I'd like to bring up — |
Co-authored-by: Mior Muhammad Zaki <crynobone@gmail.com>
Co-authored-by: Hafez Divandari <hafezdivandari@gmail.com>
Query parameters can include dots in their names, which is perfectly valid. But when using $uri = Uri::of('https://dot.test/?foo.bar=baz');
dump([
(string) $uri->withQuery(['foo.bar' => 'zab']),
(string) $uri->replaceQuery(['foo.bar' => 'zab']),
]); Output: ^ array:2 [
0 => "https://dot.test/?foo_bar=baz&foo%5Bbar%5D=zab"
1 => "https://dot.test/?foo.bar=zab"
] What's happening:
So in the first case, P.S The League Query component avoids using |
* enhance URI class * Update Uri.php --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
@korkoshko I've made withQuery and replaceQuery more consistent in how they handle dot notation. |
You seem to be reading my thoughts |
URI parsing and mutation powered by
league/uri
.URI instances can be retrieved from the current request, as well as created from URLs and names routes for the current application:
URIs can even be returned directly from routes to generate a redirect to that location: