From fuse-laravel
Migrates Laravel Eloquent models, Jobs, Controllers, Console commands, API Resources, Validation, and Factories/Seeders to native PHP 8.3 attributes introduced in Laravel 13. Covers all 7 categories of first-party attributes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/fuse-laravel:laravel-attributesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before ANY implementation, use `TeamCreate` to spawn 3 agents:
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 reviewnpx claudepluginhub fusengine/agents --plugin fuse-laravelUse Laravel 13+ first-party PHP attributes for controller middleware, authorization, queue job config, and Eloquent model settings; colocate declarative config with code.
Provides complete Eloquent ORM guidance for Laravel 13 with PHP 8.3 Attributes (#[Table], #[Fillable], #[Casts]) for models, relationships, queries, observers, and factories. Activates when working with database models.
Covers modern PHP 8.4 features and Laravel conventions: thin controllers, service/action classes, Eloquent, migrations, queues, and testing. Activates automatically for PHP files.