laravel-query-builder

Automate Laravel API endpoints with filtering, sorting, and inclusion via Spatie Query Builder.

1|Updated May 24, 2026
One-click install
npx skills add https://github.com/PTKDrake/FIT-vmu --skill laravel-query-builder-ptkdrake
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-query-builder
Source: https://github.com/PTKDrake/FIT-vmu/tree/main/.agents/skills/laravel-query-builder
Command: npx skills add https://github.com/PTKDrake/FIT-vmu --skill laravel-query-builder-ptkdrake

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires spatie/laravel-query-builder, and includes scripts (resource) components.

What problem does it solve?

This Skill streamlines the process of creating API endpoints with filtering, sorting, and inclusion capabilities, enhancing the efficiency of Laravel-based applications.

Core Features & Use Cases

  • API Endpoint Creation: Build endpoints that accept query parameters for filtering, sorting, and including data.
  • Query Builder Configuration: Customize allowed filters, sorts, includes, and field selections.
  • Custom Filter and Sort Classes: Create custom classes for advanced filtering and sorting logic.
  • Use Case: For a Laravel application that requires a search functionality with pagination and sorting, this Skill can be used to implement a robust search endpoint.

Quick Start

Use the laravel-query-builder skill to create a search endpoint for users with filtering by name and sorting by creation date.

Frequently Asked Questions about laravel-query-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build Laravel API endpoints with filtering, sorting, and inclusion?

Laravel API endpoints with filtering, sorting, and inclusion are built by configuring query parameters to dynamically retrieve and sort data using the Laravel Query Builder package.

What is the best way to add dynamic query parameter handling to a Laravel application?

Dynamic query parameter handling in a Laravel application is best achieved by applying the Laravel Query Builder to map URL parameters directly to allowed filters, sorts, and field selections.

Does the Laravel Query Builder skill require the Spatie package to function?

Yes, the Laravel Query Builder skill requires the Spatie package to manage query logic, data retrieval, and the configuration of allowed filters and sorts.

Can I create advanced custom filters and sorts for my Laravel search endpoint?

Yes, you can create custom filter and sort classes to implement advanced filtering and sorting logic for complex Laravel search endpoints.

How do I configure allowed fields and data inclusions for a Laravel API?

You configure allowed fields and data inclusions by defining specific query parameter rules in the Laravel Query Builder, ensuring the API endpoint only retrieves authorized relational data.