Laravel 13.2 accepts PHP attributes such as #[Fillable], #[Guarded], #[Hidden], and #[Table] on Eloquent models. Traditional properties remain valid. The release offers a second syntax for declaring metadata that controls mass assignment, serialization, and table names.
Replacing $fillable with an attribute may look like an aesthetic preference. In a long model, however, configuration changes position in the reading order. Its contract appears beside the class name, before casts, relationships, scopes, and domain methods. A reviewer can identify sensitive rules without searching the entire body.
The value does not come from converting every file. It appears when a team adopts a clear convention and uses the new form where it improves inspection and consistency.
Top-level declarations reduce search work
Eloquent models accumulate responsibilities easily. Even in careful projects, one file may contain table configuration, assignable fields, hidden attributes, casts, and relationships. Each has a different impact, but property syntax places them at the same visual level as ordinary internal state.
PHP attributes attach metadata to a declaration. On opening the file, a reader can see that a model uses a nonconventional table, restricts assignment, and hides serialized fields. Decisions with broad effects become concentrated, which helps code review.
The benefit is stronger for security-sensitive rules. A change to assignable fields deserves different attention from an auxiliary method. Moving that list to the top does not prevent a mass assignment error, but it reduces the chance of losing an important change inside a large diff.
Tools may also use the structure. Reflection reads attributes in a standard way, and static analyzers can provide navigation or diagnostics without interpreting framework-specific conventional properties. That potential depends on ecosystem support. Readability is the immediate gain.
Two syntaxes create a team decision
Compatibility avoids mandatory migration, but neighboring models can now express the same rule differently. If every developer chooses by taste, the project replaces a search problem with inconsistency.
A simple convention can require attributes for new code and change existing code only when it is already being edited. Another team may keep properties in small models and use attributes in configuration-heavy classes. Either approach works when the rule is predictable.
Avoid converting a whole codebase solely to modernize its appearance. Such a diff touches stable files, creates merge conflicts, and offers little functional return. Opportunistic migration keeps review connected to real changes. Automation is worthwhile only at sufficient volume and with a reliable behavioral check.
Do not mix an attribute and a property for the same concern in one class. Even if the framework defines precedence, the reader has to discover which value wins. A single source per rule leaves the contract clear.
Metadata does not replace flow boundaries
#[Fillable] remains one part of protection against unwanted input. Controllers and services should use validated data, and sensitive operations may require explicit assignment. Moving the list upward improves visibility without repairing a flow that sends $request->all() into a model.
The same caution applies to #[Hidden]. Hiding an attribute from default serialization is not a general authorization mechanism. Another query, log, or transformation may expose the value. Policy must live in the layer deciding who receives the data.
#[Table] makes naming exceptions easy to find. It does not make a nonstandard table a better choice. Teams should still ask whether the divergence comes from legacy integration, a database constraint, or accumulated inconsistency.
How to evaluate adoption
A pilot can begin with three models: one simple, one configuration-heavy, and one handling sensitive input. The team compares reading time, diff clarity, and editor support. It then runs the suite to confirm serialization, assignment, and table resolution.
Laravel 13 had already expanded attributes across controllers, jobs, commands, listeners, and mailables. Version 13.2 extends that declarative language to Eloquent and adds enums in #[Queue] and #[Connection], delay lists in #[Backoff], and factory adjustments.
The direction is consistent: execution metadata moves closer to the declaration it modifies. A codebase benefits when that proximity reduces search and ambiguity. If conversion only swaps characters without a shared convention, the new syntax becomes one more choice to debate in every pull request.
If your company is weighing something similar, reach me on LinkedIn or WhatsApp.