Use with AI
Laravel Access Control 1.0 changed most of its API: controls linked by discovery, levels, boundaries, search keys. A coding assistant that learned from code written for an earlier version can write controls that no longer work. The sources on this page give it the current documentation.
Laravel Boost skill
The package ships a skill for Laravel Boost: a SKILL.md file that a coding agent loads when it works on your controls, perimeters, policies or controlled searches.
Installing the skill
The skill is named laravel-access-control. It lives in the package at resources/boost/skills/laravel-access-control/SKILL.md, so Laravel Boost finds it in vendor/lomkit/laravel-access-control once both packages are installed:
composer require laravel/boost --dev
php artisan boost:install
Select the skill during the installation. After an update of the package, run php artisan boost:update so that the agent reads the skill of the installed version. See the Laravel Boost documentation for its commands and for replacing a package skill with your own.
What the skill covers
The skill applies when a task touches a policy that should be centralized, row-level filtering of Eloquent queries, a child model with the access of its parent, the make:control, make:perimeter and access:* commands, or the classes of the Lomkit\Access\ namespace. It describes:
- controls, their discovery and
#[ControlledBy], and theAccessfacade; - perimeters, their callbacks and hooks, levels, boundaries and
ThroughParent; - the policies, their refusal codes, drafts and business abilities;
- the controlled queries and the batched decisions;
- the Laravel Scout search: search keys, engines, freshness, browser tokens and an index of your own;
- the laravel-rest-api extension,
access:checkand the test assertions; - the pitfalls to flag when reviewing or writing code.
llms.txt and Markdown pages
The site publishes its pages in formats that assistants read directly:
| URL | Content |
|---|---|
/llms.txt | The list of every page, with a description and a link to its Markdown copy |
/llms-full.txt | Every page in one Markdown file |
/raw/<page>.md | The Markdown copy of one page, such as /raw/essentials/perimeters.md |
Both files cover 1.x only. Give an assistant llms.txt and let it open the pages it needs, or give it llms-full.txt when it can read a long file.
The Copy page button at the top of each page copies its Markdown. Its menu copies the link to the Markdown copy, opens it, or opens ChatGPT or Claude with a prompt that points to it.
GitMCP
GitMCP serves a GitHub project as a remote MCP server. Its address for this site, https://lomkit.gitmcp.io/laravel-access-control-doc, reads the llms.txt of the site, and its tools let the assistant search the docs and fetch the Markdown copy of any page. Add the server to your assistant:
claude mcp add --transport http laravel-access-control https://lomkit.gitmcp.io/laravel-access-control-doc
{
"mcpServers": {
"laravel-access-control": {
"url": "https://lomkit.gitmcp.io/laravel-access-control-doc"
}
}
}
{
"servers": {
"laravel-access-control": {
"type": "http",
"url": "https://lomkit.gitmcp.io/laravel-access-control-doc"
}
}
}
Context7
Context7 indexes the documentation of libraries and serves it to coding assistants through its MCP server and its ctx7 command. Laravel Access Control is listed as /lomkit/laravel-access-control-doc, which indexes the 1.x pages of this site. Set it up with npx ctx7 setup, then name the library in your prompt:
Show only their own posts to authors, and every post of their client to managers. use library /lomkit/laravel-access-control-doc