laravel-attributes

Configure Laravel 13+ models, jobs, commands, and form requests using PHP attributes.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/thomiOmi/laravel-starterkit-api --skill laravel-attributes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-attributes
Source: https://github.com/thomiOmi/laravel-starterkit-api/tree/main/.agents/skills/laravel-attributes
Command: npx skills add https://github.com/thomiOmi/laravel-starterkit-api --skill laravel-attributes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps developers to quickly adopt Laravel Attributes to simplify and standardize their code, replacing properties with expressive attributes for better organization and maintainability.

Core Features & Use Cases

  • Model Attribute Configuration: Automatically add table, fillable, hidden, and connection attributes to Eloquent models.
  • Job Attribute Configuration: Configure queue, retries, timeout, and backoff settings for background tasks.
  • Command Attribute Configuration: Define command signatures and descriptions easily.
  • Form Request Attribute Configuration: Set up redirrects, routes, error bags for requests, etc.
  • Container Binding Attribute Configuration: Apply singleton and other container-specific attributes to classes for better dependency management.
  • PHP Built-in Attribute Example: Apply sensitive parameter attributes for security.
  • Use Case: A developer wants to implement a new command with custom signing. By using this Skill, the developer can quickly configure the command with attributes for a clean, maintainable code structure.

Quick Start

Generate a User model with attributes and run the code provided in the SKILL.md.

Frequently Asked Questions about laravel-attributes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use PHP attributes to configure Eloquent models in Laravel?

You can use PHP attributes in Laravel 13+ to replace traditional property definitions with expressive attribute syntax for table, fillable, hidden, and connection settings on Eloquent models.

What is the best way to organize Laravel command and job configurations?

Using Laravel attributes is an effective way to organize command and job configurations, allowing you to define command signatures, descriptions, queue settings, retries, timeouts, and backoff parameters directly via expressive class attributes.

Does Laravel 13 support PHP attributes for form requests and container bindings?

Yes, Laravel 13+ supports PHP attributes for setting up form request redirects, routes, error bags, and applying container binding attributes like singleton to classes for streamlined dependency management.

Can I configure queue job settings like retries and timeout using Laravel attributes?

Yes, you can configure queue jobs in Laravel using attributes to define retries, timeout, and backoff settings directly on the job class, streamlining background task configuration.

Do I need to know Laravel's class attribute syntax to use attributes for API form requests?

Yes, you need awareness of Laravel's class attribute syntax and method chaining to effectively apply attributes for API form requests, including setting up redirects, routes, and error bags.

When should I replace properties with attributes in Laravel development?

You should replace properties with attributes in Laravel development when you want to simplify and standardize your code, translating property-based settings for models, commands, and jobs into expressive attributes for improved maintainability.