Build a search endpoint with filters
Build a search endpoint with keyword search, dynamic filters, and flexible sorting built from query params. Returns paginated results with a total count.
Preview
Copy prompt
Build a search endpoint in [Language/Framework] for the [Resource] entity. Accept query parameters for a keyword search term, a sort field and direction, and filters for [List filterable fields]. Construct the database query dynamically using [ORM / query builder], sanitize and validate all input parameters before use, and return paginated results including a total count and the current page metadata.
More
Code Generation
Prompts
