Learn Laravel production architecture patterns and core backend implementation practices.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "laravel-patterns" skill from askskill: 1. Download https://raw.githubusercontent.com/affaan-m/ECC/main/skills/laravel-patterns/SKILL.md 2. Save it as ~/.claude/skills/laravel-patterns/SKILL.md 3. Reload skills and tell me it's ready
Using Laravel best practices, design a service-layer architecture for an order module, including Controller, Service, Repository (if needed), Job, Event, and API Resource. Explain responsibilities and folder structure.
A clear Laravel layered design with responsibility breakdowns and practical project structure recommendations.
My Laravel API is slow when loading orders, users, and product relations. Analyze possible N+1 issues and provide optimization strategies with eager loading, indexes, caching, and query refactoring, including sample code.
Performance bottleneck analysis, optimization ideas, and matching Laravel query and caching code examples.
Design an asynchronous post-checkout workflow for a Laravel e-commerce app using Queue, Event, Listener, and caching, covering inventory deduction, notifications, and retry handling.
A complete async architecture flow, key component breakdown, and production-ready implementation guidance.
Production-grade Laravel architecture patterns for scalable, maintainable applications.
config/* and keep environments explicit.Use a conventional Laravel layout with clear layer boundaries (HTTP, services/actions, models).
app/
├── Actions/ # Single-purpose use cases
├── Console/
├── Events/
├── Exceptions/
├── Http/
│ ├── Controllers/
│ ├── Middleware/
│ ├── Requests/ # Form request validation
│ └── Resources/ # API resources
├── Jobs/
├── Models/
├── Policies/
├── Providers/
├── Services/ # Coordinating domain services
└── Support/
config/
database/
├── factories/
├── migrations/
└── seeders/
resources/
├── views/
└── lang/
routes/
├── api.php
├── web.php
└── console.php
Keep controllers thin. Put orchestration in services and single-purpose logic in actions.
final class CreateOrderAction
{
public function __construct(private OrderRepository $orders) {}
public function handle(CreateOrderData $data): Order
{
return $this->orders->create($data);
}
}
final class OrdersController extends Controller
{
public function __construct(private CreateOrderAction $createOrder) {}
public function store(StoreOrderRequest $request): JsonResponse
{
$order = $this->createOrder->handle($request->toDto());
return response()->json([
'success' => true,
'data' => OrderResource::make($order),
'error' => null,
'meta' => null,
], 201);
}
}
Prefer route-model binding and resource controllers for clarity.
use Illuminate\Support\Facades\Route;
Route::middleware('auth:sanctum')->group(function () {
Route::apiResource('projects', ProjectController::class);
});
Use scoped bindings to prevent cross-tenant access.
Route::scopeBindings()->group(function () {
Route::get('/accounts/{account}/projects/{project}', [ProjectController::class, 'show']);
});
conversation vs conversations).{conversation} for Conversation).use App\Http\Controllers\Api\ConversationController;
use App\Http\Controllers\Api\MessageController;
use Illuminate\Support\Facades\Route;
Route::middleware('auth:sanctum')->prefix('conversations')->group(function () {
Route::post('/', [ConversationController::class, 'store'])->name('conversations.store');
Route::scopeBindings()->group(function () {
Route::get('/{conversation}', [ConversationController::class, 'show'])
->name('conversations.show');
Route::post('/{conversation}/messages', [MessageController::class, 'store'])
->name('conversation-messages.store');
Route::get('/{conversation}/messages/{message}', [MessageController::class, 'show'])
->name('conversation-messages.show');
});
});
…
Fetches up-to-date framework docs for setup, APIs, and code examples.
Speed up complex tasks with parallel execution while preserving correctness.
Apply modern, safe, idiomatic C++ standards for writing, review, and refactoring.
Conduct multi-source web research and produce cited, source-attributed reports.
Design adaptive agent workflows with eval gates and reusable skill extraction.
Optimize React and Next.js performance during coding, review, and refactoring.
Learn Django architecture, DRF API design, and production-ready development practices.
Design and improve Spring Boot backend architecture, APIs, and service implementation.
Design Quarkus 3 backend patterns for messaging, APIs, data, and async workflows.
Learn Laravel TDD and automated testing with modern practical techniques.
Apply Laravel security best practices for auth, vulnerabilities, APIs, and deployment.
Apply NestJS architecture patterns to build maintainable production-ready TypeScript backends.