plugins/laravel-expert/skills/laravel-attributes/SKILL.md
Use when migrating Eloquent models, Jobs, Console commands, Controllers, API Resources, Validation, Factories or Seeders to native PHP 8.3 attributes introduced in Laravel 13. Covers all 7 categories of first-party attributes.
npx skillsauth add fusengine/agents laravel-attributesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before ANY implementation, use TeamCreate to spawn 3 agents:
protected $fillable / $hidden / $connection properties to convertlaravel.com/docs/13.xAfter implementation, run fuse-ai-pilot:sniper for validation.
| Category | Attributes |
|---------|-------------|
| Eloquent | #[Table] #[Connection] #[Fillable] #[Hidden] #[Visible] #[Guarded] #[Unguarded] #[Appends] #[Touches] |
| Queue / Job | #[Connection] #[Queue] #[Tries] #[Timeout] #[Backoff] #[MaxExceptions] #[FailOnTimeout] #[UniqueFor] |
| Console | #[Signature] #[Description] |
| Controllers | #[Middleware] #[Authorize] |
| Validation | #[RedirectTo] #[StopOnFirstFailure] |
| API Resources | #[Collects] #[PreserveKeys] |
| Factories / Seeders | #[UseModel] #[Seed] #[Seeder] |
#[Fillable(['name'])] + protected $fillable = [...] causes Laravel to ignore the attribute silentlyIlluminate\Database\Eloquent\Attributes\* for Eloquent, Illuminate\Queue\Attributes\* for Jobsapp/
├── Models/
│ └── User.php # #[Table] #[Fillable] #[Hidden] #[Appends]
├── Jobs/
│ └── ProcessPodcast.php # #[Connection] #[Queue] #[Tries] #[Backoff]
├── Console/Commands/
│ └── SendEmails.php # #[Signature] #[Description]
├── Http/
│ ├── Controllers/
│ │ └── PostController.php # #[Middleware] #[Authorize]
│ └── Resources/
│ └── PostCollection.php # #[Collects] #[PreserveKeys]
└── Http/Requests/
└── StoreUserRequest.php # #[RedirectTo] #[StopOnFirstFailure]
→ See Model-with-attributes.php.md for full example
| Topic | Reference | When to Consult |
|-------|-----------|-----------------|
| Eloquent models | eloquent.md | Migrating $fillable / $hidden / $table / $connection |
| Queue jobs | queue.md | Replacing $tries / $timeout / $backoff properties |
| Console commands | console.md | Refactoring $signature / $description properties |
| Controllers | controllers.md | Moving middleware/authorize from constructors |
| Validation | validation.md | FormRequest redirect + early-stop config |
| API Resources | api-resources.md | Collection wrapping and key preservation |
| Factories / Seeders | factories-seeders.md | Model binding and seeder discovery |
| Template | When to Use | |----------|-------------| | Model-with-attributes.php.md | Net new Eloquent model | | Job-with-attributes.php.md | Net new queue Job |
use Illuminate\Database\Eloquent\Attributes\{Table, Fillable, Hidden, Appends};
#[Table('flights')]
#[Fillable(['name', 'origin'])]
#[Hidden(['password'])]
#[Appends(['is_admin'])]
class Flight extends Model {}
use Illuminate\Queue\Attributes\{Connection, Queue, Tries, Backoff};
#[Connection('redis')]
#[Queue('podcasts')]
#[Tries(5)]
#[Backoff([10, 30, 60])]
class ProcessPodcast implements ShouldQueue {}
→ See Job-with-attributes.php.md for complete example
use syntax#[Fillable] for mass-assigned models and #[Unguarded] only on trusted internal models#[Connection] + #[Queue] on Jobs to centralize routing intent#[Fillable(['x'])] with protected $fillable = ['y'] - the property silently wins on some setups, the attribute on others#[Authorize] on a controller without an underlying Policy registered in AuthServiceProvider$tries, $backoff, $timeout properties after adding the attributes - duplication is a red flag for code reviewdevelopment
Use when optimizing entity-based / semantic SEO 2026. Covers entity maps, Google Knowledge Graph resolution, salience scoring, passage-level ranking, about/sameAs/knowsAbout schema, Cloud Natural Language API validation.
development
Use when running SEO, GEO, schema, Core Web Vitals, sitemap, hreflang, E-E-A-T, AI Overviews, technical SEO, or structured data tasks. Covers full-site audits, single-page analysis, schema markup, content quality, AI search optimization, local SEO, sitemap/robots, internal linking, semantic clustering, and search experience.
development
Use when optimizing search experience (SXO). Covers intent matching, user personas, user stories, page-type analysis, dwell time, scroll depth, pogo-sticking prevention.
development
Use when optimizing local SEO. Covers Google Business Profile, NAP consistency, citations, reviews acquisition, Local Pack ranking, location pages, LocalBusiness schema.