Skip to content
项目

MrPunyapal/laravel-attributes-list

在 GitHub 查看

关于

List of All available PHP attributes in Laravel framework.

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

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


🧪 Form Requests


🌱 Testing


🏭 Factories


📡 API Resources


🔌 Dependency Injection

  • #[Auth] — Inject an auth guard instance
  • #[Authenticated] — Inject the currently authenticated user
  • #[Bind] — Contextually bind to a specific implementation
  • #[BindWhen] — Conditionally 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
  • #[RequestAttribute] — Inject a value from the request's attributes collection
  • #[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)


🧠 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


探索相关项目

加载中…