我有一些仪表板模块。
Dashboard
├── Components
├── Policies
├── Queries
└── QueryScopes
└── UserActivity (this corresponds to component)
Dashboard\DashboardBuilder
vs只有Dashboard\Builder
?
Dashboard\DashboardComponent
(界面)与仅Dashboard\Component
?
Dashboard\Queries\UserActivityQuery
vs只有Dashboard\Queries\UserActivity
?
Dashboard\Policies\UserActivityPolicy
vs只有Dashboard\Policies\UserActivity
?
有什么优点/缺点? 你用什么?
注意:
我试图找出Laravel遵循的约定,但即使存在一些不一致(Policies\PostPolicy
但Query\Builder
)。