@elliot_putt Spatie (of course) has a package that solves this problem: https://spatie.be/docs/laravel-query-builder/v5/introduction
You build your filters (and sorts) using query string parameters. For example:
https://example.com/users?filter[name]=John&sort-created_at&sort=name
This will filter users to those who have “John” in their name, and then sort by created_at descending, then name ascending (alphabetically).