laravel-query-builders

Community

Craft type-safe, composable Laravel queries.

Authornextplus896
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Custom query builders for type-safe, composable database queries in Laravel, helping you centralize complex query logic and improve IDE support.

Core Features & Use Cases

  • Type-safe custom builders for common queries, improving autocomplete and reducing errors.
  • Nested and fluent query composition with methods like wherePending, whereCustomer, withRelated.
  • Automatic model integration via Laravel 11+ attributes or static properties, and easy reuse across controllers and services.
  • Example: encapsulate customer-scoped queries in a single builder to avoid duplicating code.

Quick Start

  • Create a builder class extending Illuminate\Database\Eloquent\Builder (e.g., OrderBuilder).
  • Register the builder with a model using #[UseEloquentBuilder(OrderBuilder::class)] or protected static string $eloquentBuilder = OrderBuilder::class;
  • Use it in code: Order::query()->wherePending()->get();

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: laravel-query-builders
Download link: https://github.com/nextplus896/durra-alaseel/archive/main.zip#laravel-query-builders

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.