Skip to content
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

Add ability to set a default sort attribute #7

Merged
merged 2 commits into from Jan 20, 2018

Conversation

mpociot
Copy link
Contributor

@mpociot mpociot commented Jan 17, 2018

This PR adds the ability to define a default sort parameter to use when no sort query parameter is available.

It also fixes an issue that occurred when defining allowedSorts, but then perform a request without a sort parameter.

@freekmurze
Copy link
Member

Very nice, thanks!

Could you document defaultSort in the readme?

@freekmurze freekmurze self-requested a review January 17, 2018 23:09
@mpociot
Copy link
Contributor Author

mpociot commented Jan 17, 2018

Sure - just wanted to know your thoughts on this first.
I'll update the PR tomorrow 😴

@mpociot
Copy link
Contributor Author

mpociot commented Jan 19, 2018

@freekmurze Rebased the PR and added the defaultSort method to the documentation.

@freekmurze freekmurze merged commit ff7aed4 into spatie:master Jan 20, 2018
@freekmurze
Copy link
Member

Thanks!! 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants