Your all-in-one solution for building efficient APIs with Laravel.
See the code
Build production-grade Laravel APIs with standardized responses, dynamic pagination, advanced filtering, and built-in AI architectural rules that teach your coding assistant to follow your standards from the first draft.
composer require essa/api-tool-kit
Ship production-grade APIs faster by giving your AI coding assistant a shared understanding of your architecture. One command installs 21 rule files and 8 guided workflows that ensure every AI-generated file fits your codebase from the first draft — no manual corrections needed.
Supports Claude Code, Cursor, GitHub Copilot, and Antigravity.
Full experience — slash commands, auto-loaded rules, per-tool native configuration:
php artisan api-skill:install [tool]
Supported tools: claude, cursor, copilot, antigravity. The installer copies rules and workflows to the correct location for your tool — e.g. /investigate, /code-review, /new-endpoint become real slash commands in Claude Code.
Quick setup via Laravel Boost — agent-agnostic, works with all AI tools:
php artisan boost:add-skill ahmedesa/laravel-api-tool-kit
Installs to .ai/skills/laravel-api-tool-kit/ — a universal location Claude Code, Cursor, Copilot, Antigravity, and Gemini all read from on demand. No slash commands, but zero configuration.
[!TIP] In non-interactive environments (Docker/CI), bypass the selection prompt with:
php artisan boost:add-skill ahmedesa/laravel-api-tool-kit --skill=laravel-api-tool-kit
| Category | Contents |
|---|---|
| Rules | Controllers, Models, Actions, DTOs, Services, Repositories, Filters, Enums, Events, Requests, Resources, Responses, Exceptions, Authorization, Testing, Database, Pagination, Anti-patterns, Code Quality, DDD, Dependency Injection |
| Workflows | New endpoint, add filtering, code review, investigate, curl-test, organize knowledge, update knowledge, create workflow |
| DDD Support | Works with both standard Laravel and Domain-Driven Design layouts |
| Project Defaults | Configure primary key type, auth guard, and test base class once — the AI applies them everywhere |
[!TIP] The AI Skill is the recommended way to generate code for projects using this package. It replaces the need for scaffolding generators by teaching your AI assistant the full architecture.
Read the full AI Skill documentation →
The built-in AI Skill teaches your coding assistant to generate code that follows your architecture out of the box — no more fixing AI output to match your standards.
The API Response feature simplifies generating consistent JSON responses. It provides a standardized format for your API responses:
{
"message": "your resource successfully",
"data": [
...
]
}
Don't fuss over managing the number of results per page. The dynamic pagination feature adapts effortlessly to your needs, giving you control without complications.
$users = User::dynamicPaginate();
Refine query results with simplicity. The powerful filtering system lets you filter, sort, search, and even include relationships with ease.
Car::useFilters()->get();
Tackle complex business logic with Actions. These gems follow the command pattern, boosting readability and maintenance for your code.
class CarController extends Controller
{
public function __construct(
private readonly CreateCarAction $createCar,
) {}
public function store(CreateCarRequest $request): JsonResponse
{
$car = $this->createCar->execute($request->validated());
return $this->responseCreated(trans('car.created'), new CarResource($car));
}
}
Handle file uploads and deletions like a pro. The Media Helper streamlines media management, leaving you with clean and organized file handling.
$filePath = MediaHelper::uploadFile($file, $path);
The Enum class provides a way to work with enumerations, eliminating hardcoded values in your code:
enum UserType: string
{
case ADMIN = 'admin';
case STUDENT = 'student';
}
The API Generator automates file setup, creating key files from migrations to controllers. Use one command to kickstart your API development.
[!NOTE] For AI-assisted development, the AI Skill is the recommended approach. It teaches your AI assistant the full architecture so generated code fits your project from the start. The API Generator remains available for developers who prefer traditional scaffolding.
php artisan api:generate ModelName --all
If you'd prefer a more visual review of this package, please watch this video on Laravel Package Tutorial.
Access our documentation to unlock the full potential of the Laravel API Toolkit:
We welcome your contributions to help make this package even better. Please refer to our CONTRIBUTING.md file for contribution guidelines.
By contributing to the Laravel API Toolkit, you agree that your contributions will be licensed under the project's MIT License.
Your all-in-one solution for building efficient APIs with Laravel.
See the code
Build production-grade Laravel APIs with standardized responses, dynamic pagination, advanced filtering, and built-in AI architectural rules that teach your coding assistant to follow your standards from the first draft.
composer require essa/api-tool-kit
Ship production-grade APIs faster by giving your AI coding assistant a shared understanding of your architecture. One command installs 21 rule files and 8 guided workflows that ensure every AI-generated file fits your codebase from the first draft — no manual corrections needed.
Supports Claude Code, Cursor, GitHub Copilot, and Antigravity.
Full experience — slash commands, auto-loaded rules, per-tool native configuration:
php artisan api-skill:install [tool]
Supported tools: claude, cursor, copilot, antigravity. The installer copies rules and workflows to the correct location for your tool — e.g. /investigate, /code-review, /new-endpoint become real slash commands in Claude Code.
Quick setup via Laravel Boost — agent-agnostic, works with all AI tools:
php artisan boost:add-skill ahmedesa/laravel-api-tool-kit
Installs to .ai/skills/laravel-api-tool-kit/ — a universal location Claude Code, Cursor, Copilot, Antigravity, and Gemini all read from on demand. No slash commands, but zero configuration.
[!TIP] In non-interactive environments (Docker/CI), bypass the selection prompt with:
php artisan boost:add-skill ahmedesa/laravel-api-tool-kit --skill=laravel-api-tool-kit
| Category | Contents |
|---|---|
| Rules | Controllers, Models, Actions, DTOs, Services, Repositories, Filters, Enums, Events, Requests, Resources, Responses, Exceptions, Authorization, Testing, Database, Pagination, Anti-patterns, Code Quality, DDD, Dependency Injection |
| Workflows | New endpoint, add filtering, code review, investigate, curl-test, organize knowledge, update knowledge, create workflow |
| DDD Support | Works with both standard Laravel and Domain-Driven Design layouts |
| Project Defaults | Configure primary key type, auth guard, and test base class once — the AI applies them everywhere |
[!TIP] The AI Skill is the recommended way to generate code for projects using this package. It replaces the need for scaffolding generators by teaching your AI assistant the full architecture.
Read the full AI Skill documentation →
The built-in AI Skill teaches your coding assistant to generate code that follows your architecture out of the box — no more fixing AI output to match your standards.
The API Response feature simplifies generating consistent JSON responses. It provides a standardized format for your API responses:
{
"message": "your resource successfully",
"data": [
...
]
}
Don't fuss over managing the number of results per page. The dynamic pagination feature adapts effortlessly to your needs, giving you control without complications.
$users = User::dynamicPaginate();
Refine query results with simplicity. The powerful filtering system lets you filter, sort, search, and even include relationships with ease.
Car::useFilters()->get();
Tackle complex business logic with Actions. These gems follow the command pattern, boosting readability and maintenance for your code.
class CarController extends Controller
{
public function __construct(
private readonly CreateCarAction $createCar,
) {}
public function store(CreateCarRequest $request): JsonResponse
{
$car = $this->createCar->execute($request->validated());
return $this->responseCreated(trans('car.created'), new CarResource($car));
}
}
Handle file uploads and deletions like a pro. The Media Helper streamlines media management, leaving you with clean and organized file handling.
$filePath = MediaHelper::uploadFile($file, $path);
The Enum class provides a way to work with enumerations, eliminating hardcoded values in your code:
enum UserType: string
{
case ADMIN = 'admin';
case STUDENT = 'student';
}
The API Generator automates file setup, creating key files from migrations to controllers. Use one command to kickstart your API development.
[!NOTE] For AI-assisted development, the AI Skill is the recommended approach. It teaches your AI assistant the full architecture so generated code fits your project from the start. The API Generator remains available for developers who prefer traditional scaffolding.
php artisan api:generate ModelName --all
If you'd prefer a more visual review of this package, please watch this video on Laravel Package Tutorial.
Access our documentation to unlock the full potential of the Laravel API Toolkit:
We welcome your contributions to help make this package even better. Please refer to our CONTRIBUTING.md file for contribution guidelines.
By contributing to the Laravel API Toolkit, you agree that your contributions will be licensed under the project's MIT License.