---
title: "lint/laravel-12"
pagination: false
---

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

Upgrade to Laravel 12: code a newer Laravel removes, deprecates or does better.

**[prefer-scope-attribute](/docs/rules/lint/laravel-12/prefer-scope-attribute)**

Changes model scope methods to use the scope attribute

Not in any preset. In Rector's `rector-laravel/laravel-120`, `rector-laravel/up-to-laravel-120`, `rector-laravel/up-to-laravel-130`, `rector-laravel/up-to-laravel-130-without-attributes` sets. Needs the `laravel` extension. Unsafe fix: it can change behavior.
