Skip to content

MrPunyapal/laravel-attributes-list

Repository files navigation

Laravel PHP Attributes List

A curated list of PHP Attributes available in Laravel Framework.


Install the skill

  • Boost (recommended):
php artisan boost:add-skill MrPunyapal/laravel-attributes-list --skill laravel-attributes
  • NPX
npx skills add MrPunyapal/laravel-attributes-list --skill laravel-attributes

📊 Eloquent (Models)


📦 Queue (Jobs / Listeners / Notifications / Mailables)


⚙️ Console (Artisan Commands)


🎛️ Controllers

  • #[Middleware] — Assign middleware to a controller class or action method
  • #[Authorize] — Authorize a controller action via the gate

🧪 Form Requests


🌱 Testing

  • #[Seeder] — Run a specific seeder class during tests
  • #[Seed] — Run the database seeder during tests
  • #[SetUp] — Mark a trait method as a test setup hook
  • #[TearDown] — Mark a trait method as a test teardown hook
  • #[UnitTest] — Skip framework boot for individual test methods

🏭 Factories


📡 API Resources


🔌 Dependency Injection

  • #[Auth] — Inject an auth guard instance
  • #[Authenticated] — Inject the currently authenticated user
  • #[Bind] — Contextually bind to a specific implementation
  • #[Cache] — Inject a cache store instance
  • #[Config] — Inject a configuration value
  • #[Context] — Inject a value from the application context
  • #[CurrentUser] — Inject the currently authenticated user model
  • #[DB] — Inject a database connection instance
  • #[Database] — Inject a named database connection
  • #[Give] — Give a specific binding contextually
  • #[Log] — Inject a logger with a named channel
  • #[RouteParameter] — Inject a route parameter value
  • #[Scoped] — Register a class as a scoped singleton in the container
  • #[Singleton] — Register a class as a singleton in the container
  • #[Storage] — Inject a storage disk instance
  • #[Tag] — Inject all bindings tagged with a given tag

🤖 AI (Agents)

  • #[MaxSteps] — Maximum number of steps the agent may take when using tools
  • #[MaxTokens] — Maximum number of tokens the model may generate
  • #[Model] — Define the model the agent should use
  • #[Provider] — Define the AI provider (or providers for failover)
  • #[Temperature] — Define the sampling temperature for generation
  • #[Timeout] — Define the HTTP timeout in seconds for agent requests
  • #[TopP] — Define the top-p sampling threshold for generation
  • #[UseCheapestModel] — Use the provider's cheapest text model
  • #[UseSmartestModel] — Use the provider's most capable text model

🧠 Notes

  • Attributes provide an alternative to traditional class properties
  • They are used across multiple parts of the framework
  • Existing approaches (properties, methods) continue to work

🐘 PHP Built-in Attributes


🤝 Contributing

Contributions are welcome.


👤 Author

@MrPunyapal


About

List of All available PHP attributes in Laravel framework.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages