---
title: "lint/laravel/add-scope-builder-generics"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="lint/laravel/add-scope-builder-generics" />

In the [`types`](/docs/rules/sets/types) set. Unsafe fix: it can change behaviour. Runs when laravel is installed. **Planned: not in Pun yet.** Enabling it is a config error.

## What it does

Add generic Builder return type to scopes in child of Illuminate\Database\Eloquent\Model

## Replaces

- [`AddGenericBuilderToScopes`](https://getrector.com/rule-detail/add-generic-builder-to-scopes-rector) (rector-laravel)

[More lint/laravel rules](/docs/rules/lint/laravel) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
