SKILL

laravel-patterns

面向生产应用的 Laravel 架构模式、路由/控制器、Eloquent ORM、服务层、队列、事件、缓存和 API 资源。构建或审查 Laravel 应用中的控制器、Eloquent、服务层、队列或 API 资源时使用。

译文已校对
查看英文原文

Laravel architecture patterns, routing/controllers, Eloquent ORM, service layers, queues, events, caching, and API resources for production apps. Use when building or reviewing Laravel apps — controllers, Eloquent, service layers, queues, or API resources.

适用对象:软件开发与测试。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • Laravel Development Patterns
  • When to Use
  • How It Works
  • Examples
  • Project Structure
  • Recommended Layout
  • Controllers -> Services -> Actions
  • Routing and Controllers

Production-grade Laravel architecture patterns for scalable, maintainable applications. Building Laravel web applications or APIs Structuring controllers, services, and domain logic Working with Eloquent models and relationships Designing APIs with resources and pagination Adding queues, events, caching, and background jobs Structure the app around clear boundaries (controllers -> services/actions -> models). Use explicit bindings and scoped bindings to keep routing predictable; still enforce authorization for access control. Favor typed models, casts, and scopes to keep domain logic consistent. Keep IO-heavy work in queues and cache expensive reads. Centralize config in config/ and keep environments explicit. Use a conventional Laravel layout with clear layer boundaries (HTTP, services/actions, models). Keep controllers thin. Put orchestration in services and single-purpose logic in actions. Prefer route-model binding and resource controllers for clarity. Use scoped bindings to prevent cross-tenant access. Keep prefixes and paths consistent to avoid double nesting (e.g., conversation vs conversations). Use a single parameter name that matches the bound model (e.g., {conversation}

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
affaan-m/ECC
源文件
pi/core/skills/laravel-patterns/SKILL.md
固定版本
d2ef2680594f9a17526a6e1a2e18b3d242c5d17b
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:affaan-m/ECC · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T15:01:43.077Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。