/fuse-laravel:laravel-attributesfrom fuse-laravel
Migrates Laravel 13 Eloquent models, Jobs, Console commands, Controllers, API Resources, Validation, Factories and Seeders to PHP 8.3 attributes, replacing legacy class properties.
Ships in fuse-laravel. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:
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] #[WithoutTimestamps] #[WithoutIncrementing] #[DateFormat] #[Refreshes] (13.33+) — no #[Casts] (use casts()) |
| Queue / Job | #[Connection] #[Queue] #[Tries] #[Timeout] #[Backoff] #[MaxExceptions] #[FailOnTimeout] #[UniqueFor] #[DeleteWhenMissingModels] #[Delay] (13.4+) #[DebounceFor] (13.6+) |
| Console | #[Signature] #[Description] |
| Controllers | #[Middleware] #[Authorize] #[WithoutMiddleware] (13.20+) — namespace Illuminate\Routing\Attributes\Controllers |
| Validation | #[RedirectTo] #[RedirectToRoute] #[ErrorBag] #[StopOnFirstFailure] #[FailOnUnknownFields] — namespace Illuminate\Foundation\Http\Attributes |
| API Resources | #[Collects] #[PreserveKeys] |
| Factories / Testing | #[UseModel] (factories) · #[Seed] #[Seeder] #[UnitTest] (test classes, Illuminate\Foundation\Testing\Attributes) |
| Container | #[BindWhen] (13.22+, PHP 8.5) and the contextual attributes (#[Config], #[Auth], ...) |
#[Fillable(['name'])] + protected $fillable = [...] causes Laravel to ignore the attribute silently#[Middleware] / #[Authorize] also work on public action methodsIlluminate\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 | Factory model binding and test seeding |
| 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 action without an underlying Policy (auto-discovered, Gate::policy() in AppServiceProvider, or #[UsePolicy] on the model)$tries, $backoff, $timeout properties after adding the attributes - duplication is a red flag for code reviewreferences/api-resources.md (opens in a new tab)references/console.md (opens in a new tab)references/controllers.md (opens in a new tab)references/eloquent.md (opens in a new tab)references/factories-seeders.md (opens in a new tab)references/queue.md (opens in a new tab)references/templates/Job-with-attributes.php.md (opens in a new tab)references/templates/Model-with-attributes.php.md (opens in a new tab)references/validation.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
23 skills in this plugin
/fusecoreUse when creating modules, understanding FuseCore structure, or implementing features in a FuseCore modular-monolith Laravel project./laravel-ai-sdkUse when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the `laravel/ai` package./laravel-apiUse when creating API endpoints, transforming responses with API Resources, or handling API authentication, rate limiting, or versioning./laravel-architectureUse when structuring a Laravel project, creating services/repositories/actions, implementing dependency injection, or organizing code layers./laravel-authUse when implementing user authentication, API tokens, social login, or authorization in Laravel 13./laravel-billingUse when implementing subscriptions, invoices, payment methods, webhooks, or billing portals with Laravel Cashier (Stripe or Paddle).npx claudepluginhub fusengine/claude-plugins --plugin fuse-laravelOther plugins' skills for the same job