Add a skill for Laravel Boost#40
Conversation
WalkthroughAdds a new comprehensive Boost skill document for lomkit/laravel-access-control describing activation checks, core authorization model (Perimeter, OverlayPerimeter, Control), HasControl macros, ControlledPolicy semantics, Scout integration constraints, configuration options, Artisan generators, and a pitfalls checklist. ChangesLaravel Access Control Skill Documentation
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@resources/boost/skills/laravel-access-control/SKILL.md`:
- Line 293: The lambda passed to ->should uses parameter names ($u, $m) that are
ambiguous; rename them to model-oriented names for clarity (e.g., change
->should(fn ($u, $m) => true) to ->should(fn ($user, $model) => true) or
->should(fn ($user, $post) => true)) so the second parameter clearly represents
the model in functions like should.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f90a4634-ed06-4dd1-a1c5-0433bdd166d0
📒 Files selected for processing (1)
resources/boost/skills/laravel-access-control/SKILL.md
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@resources/boost/skills/laravel-access-control/SKILL.md`:
- Line 71: Update the documentation to clarify macro registration: state that
the HasControl trait provides the `controlled()` and `uncontrolled()` macros for
Eloquent builders (and exposes the model's Control) but that Scout's
`controlled()` macro is registered separately by `AccessServiceProvider`; also
note that `uncontrolled()` is only available on Eloquent builders and add a
cross-reference to the Scout integration section where the Scout macro
registration via `AccessServiceProvider` is described.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 76e89600-fe38-4b9b-9fe4-d393a601de78
📒 Files selected for processing (1)
resources/boost/skills/laravel-access-control/SKILL.md
| } | ||
| ``` | ||
|
|
||
| - HasControl trait: adds `controlled()` and `uncontrolled()` macros to Eloquent (and Scout) builders and exposes the model's Control. Example usage: |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify where `controlled`/`uncontrolled` macros are registered and whether `HasControl` touches Scout\Builder.
rg -n -C3 --iglob '*{HasControl,AccessServiceProvider,Scout}*.php' '\bmacro\s*\(|class\s+HasControl|Laravel\\Scout\\Builder|controlled\s*\(|uncontrolled\s*\('Repository: Lomkit/laravel-access-control
Length of output: 3004
Clarify that Scout macro registration is handled separately from HasControl.
The phrasing "HasControl trait: adds controlled() and uncontrolled() macros to Eloquent (and Scout) builders" is misleading. Scout's controlled() macro is registered by AccessServiceProvider, not the trait. Additionally, uncontrolled() is available only on Eloquent builders. Reword to scope HasControl to Eloquent macro availability and separately reference the Scout integration section.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@resources/boost/skills/laravel-access-control/SKILL.md` at line 71, Update
the documentation to clarify macro registration: state that the HasControl trait
provides the `controlled()` and `uncontrolled()` macros for Eloquent builders
(and exposes the model's Control) but that Scout's `controlled()` macro is
registered separately by `AccessServiceProvider`; also note that
`uncontrolled()` is only available on Eloquent builders and add a
cross-reference to the Scout integration section where the Scout macro
registration via `AccessServiceProvider` is described.
Add a skill for Laravel Boost
Summary by CodeRabbit