Skip to content
Back to skills

Using Laravel Entry Points

ASecurity

Implement or refactor Laravel controllers, commands, jobs, listeners, and scheduled tasks. Use for endpoints, authentication, request validation, simple reads, or extracting business orchestration into Actions.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 29, 2026
ai-agentsrustphpreact

Security analysis

A100/100

Scanned September 29, 2026

npx -y skills add maiobarbero/laravel-boost-ddd --skill using-laravel-entry-points --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Using Laravel Entry Points?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Using Laravel Entry Points
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/maiobarbero-using-laravel-entry-points/badge)](https://www.skillsdirectory.com/skills/maiobarbero-using-laravel-entry-points)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: using-laravel-entry-points
description: Implement or refactor Laravel controllers, commands, jobs, listeners, and scheduled tasks. Use for endpoints, authentication, request validation, simple reads, or extracting business orchestration into Actions.
---

# Laravel entry points

Keep controllers, commands, jobs, listeners, policies, and providers in Laravel's usual locations. Entry points authenticate, validate or normalize transport input, and translate application results or exceptions into transport output.

For meaningful business operations, use `Controller -> Action`, `Command -> Action`, `Job -> Action`, or `Listener -> Action`. Pass explicit input and an actor when authorization is required; the Action authorizes its use case. Background work must have an intentional actor or trusted system policy, not an accidental authorization bypass.

```php
public function destroy(Request $request, Order $order, CancelOrder $cancelOrder): Response
{
    $cancelOrder->handle($request->user(), $order->id);

    return response()->noContent();
}
```

Assume authentication middleware and imports for Laravel Request/Response, the domain Order, and the application CancelOrder. Route binding resolves the model; the Action still authorizes. Map domain exceptions centrally using Laravel's exception handling or an appropriate local adapter. Do not add HTTP status codes to domain exceptions.

For structured input, map validated request values into a Data object when useful. Domain invariants must also be enforced for non-HTTP callers.

## Keep simple operations simple

A simple list/detail read can use Eloquent directly, authorize with policies/gates, and return a Resource. Do not create an Action just to wrap a query or trivial framework operation. Move meaningful business behavior and coordination into Application; move invariants into Domain.

A listener may perform a small technical side effect directly. A multi-step business reaction should invoke an Action. External effects triggered by transactional changes must wait until commit.

Actions do not dispatch concrete `App\Jobs` classes. Prefer business events for asynchronous follow-up; reserve contracts for concrete infrastructure capabilities.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.