You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a bit tedious having to write a condition every time, as calling $links->getRel('next')->getUri() when there is no next link getRel returns null and causes an error.
Maybe we could add another method, such as: links->getRelUri('next') to try to fetch the url directly?
Let me know and I can create a PR.
I also noticed a couple of improvements that could be made, so can create a PR for those as well if you want :)
The text was updated successfully, but these errors were encountered:
atymic
changed the title
Simply getting URI
Simplify getting URI
Jul 22, 2019
Hey :)
First of all, thanks for the library, was going to write one very similar but found yours!.
Just a quick suggestion, currently i'm doing something like this in the code:
It's a bit tedious having to write a condition every time, as calling
$links->getRel('next')->getUri()
when there is nonext
linkgetRel
returnsnull
and causes an error.Maybe we could add another method, such as:
links->getRelUri('next')
to try to fetch the url directly?Let me know and I can create a PR.
I also noticed a couple of improvements that could be made, so can create a PR for those as well if you want :)
The text was updated successfully, but these errors were encountered: