dare-laravel-api

dare-laravel-api is a command for Claude Code from dewtech-technologies/dare-method. It costs 0 tokens per session (1,464 once invoked), scanned A, original, MIT.

A set of API conventions and scaffolding commands for building REST APIs with Laravel 11 and PHP 8.3, including controllers, services, repositories, database models, validation, errors, and tests.

In plain words
What is it for?
Use it to audit a Laravel API, generate CRUD features, or move controller logic into services. It also covers Eloquent database models, Pest tests, and static analysis.
Why use it?
It gives Laravel projects a consistent structure and moves business logic out of controllers, making the code easier to check and maintain.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dewtech-technologies/dare-method/dare-laravel-api
Clone the repo
git clone --depth 1 https://github.com/dewtech-technologies/dare-method

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dare-laravel-api

README.md
[![agentmods](https://agentmods.dev/badge/commands/dewtech-technologies/dare-method/dare-laravel-api.svg)](https://agentmods.dev/commands/dewtech-technologies/dare-method/dare-laravel-api)
Your own site
<a href="https://agentmods.dev/commands/dewtech-technologies/dare-method/dare-laravel-api"><img src="https://agentmods.dev/badge/commands/dewtech-technologies/dare-method/dare-laravel-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,464 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01464
Opus 5 $0.00000 $0.00732
Sonnet 5 $0.00000 $0.00293
Haiku 4.5 $0.00000 $0.00146

Measured yesterday against content hash 56719f6dae33, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dare-laravel-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

implementations/claude/.claude/commands/dare-laravel-api.md · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/dare-laravel-api

Padrões DARE para APIs REST em Laravel 11 + PHP 8.3. Strict Types, FormRequests, Services, Resources, Repositories, Eloquent + casts, tratamento global de exceções, testes Pest, PHPStan/Larastan nível 8.

Como usar

/dare-laravel-api                          # audita projeto Laravel
/dare-laravel-api scaffold users           # gera CRUD com camadas
/dare-laravel-api migrate-controllers      # extrai lógica de Controllers para Services

Stack canônica

  • PHP 8.3 com declare(strict_types=1); em todo arquivo
  • Laravel 11.x modo API
  • PostgreSQL 16 ou MySQL 8
  • Pest para testes (ou PHPUnit 11)
  • PHPStan + Larastan nível 8
  • Pint para formatação
  • Sanctum para auth

Layered Design

Camada Pasta Laravel
Handler app/Http/Controllers/
Service app/Services/
Repository app/Repositories/
Model app/Models/
Presenter app/Http/Resources/

Controllers (Handler)

<?php declare(strict_types=1);

namespace App\Http\Controllers;

use App\Http\Requests\StoreUserRequest;
use App\Http\Resources\UserResource;
use App\Services\RegisterUser;

final class UserApiController extends Controller
{
    public function __construct(private RegisterUser $service) {}

    public function store(StoreUserRequest $request): UserResource
    {
        $user = $this->service->execute($request->validated());
        return new UserResource($user);
    }
}

Regras:

  • Apenas: recebe → valida via FormRequest → chama Service → retorna Resource
  • NUNCA: query Eloquent, lógica de negócio, validação inline

FormRequests

final class StoreUserRequest extends FormRequest
{
    public function authorize(): bool { return $this->user()->can('create', User::class); }

    public function rules(): array {
        return [
            'email' => ['required', 'email', 'unique:users,email'],
            'password' => ['required', 'string', 'min:12'],
        ];
    }
}

Services

Uma operação por classe:

Read the full file on GitHub · 212 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 212 lines · 0 tokens per session scan A 56719f6dae33

Subscribe to this mod's changes

dare-laravel-api is a command published in the GitHub repository dewtech-technologies/dare-method (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,464 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.