# Build Better Laravel Applications

Laravel projects need consistent patterns for models, APIs, queues, interfaces, and tests. This skill provides practical examples for implementing and checking those features.

## Install

```bash
npx skillstore add jeffallan/laravel-specialist
```

## Metadata

- Status: approved
- Slug: jeffallan-laravel-specialist
- Version: 1.1.0
- Author version: 1.1.0
- Skillstore revision: r2
- Version status: valid
- Tree hash: 2b1c8f28d1edb02433dea32e0ef31a432cd0e33c0f107acf10c73dc305a53557
- Author: jeffallan
- GitHub username: jeffallan
- License: MIT
- Repository: https://github.com/jeffallan/claude-skills/tree/main/skills/laravel-specialist/
- Ref: 1c2ebded2116f8124f45dba86a2e567f56e64d8e
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: scripts, env\_access, network, external\_commands
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/jeffallan-laravel-specialist
- Manifest: https://skillstore.pages.dev/api/skills/jeffallan-laravel-specialist/manifest

## Capabilities

- Design Eloquent models, relationships, casts, scopes, observers, and query optimizations.
- Plan RESTful routes, form requests, API resources, middleware, versioning, and CORS settings.
- Create queued jobs with retries, backoff, batching, rate limits, Horizon monitoring, and failure handling.
- Build Livewire components with validation, pagination, events, polling, loading states, and authorization checks.
- Write Laravel feature, unit, API, authentication, database, factory, and Pest tests.
- Suggest Laravel project workflows that include Artisan validation checkpoints and coverage targets.

## Use Cases

- Plan a Laravel API: Define versioned routes, form requests, middleware, API resources, pagination, and validation for a new backend feature.
- Improve Data Access: Review Eloquent relationships and queries to reduce N\+1 queries, control selected columns, add indexes, and process large datasets safely.
- Build Reactive Features: Create Livewire forms and lists with validation, authorization, events, loading states, pagination, and automated tests.

## Prompt Templates

### Create a Laravel Model

```
Design a Laravel model for [domain object]. Include the migration fields, relationships, casts, fillable attributes, validation needs, and a short test plan.
```

### Design a REST Endpoint

```
Plan a versioned Laravel API endpoint for [feature]. Provide the route, form request rules, controller responsibilities, API resource shape, authorization checks, and focused tests.
```

### Build a Queued Workflow

```
Design a Laravel queued workflow for [long-running task]. Cover job boundaries, payload safety, retries, backoff, idempotency, rate limiting, failure handling, and Horizon monitoring.
```

### Review a Laravel Feature

```
Review this Laravel feature for correctness, security, performance, and tests. Identify framework risks with file or symbol references. Propose a prioritized implementation plan: [feature details].
```

## Limitations

- It provides guidance and examples, but it does not run migrations, workers, tests, or deployments by itself.
- It cannot verify project-specific dependencies, database schemas, infrastructure, or production configuration without access to the project.
- Examples require adaptation to the application domain, Laravel version, authorization model, and existing conventions.
- It does not replace a security review for authentication, authorization, secrets, queues, file uploads, or external integrations.

## Best Practices

- Adapt every example to the project schema, Laravel version, authorization rules, and deployment environment.
- Validate inputs, protect sensitive data, use least-privilege credentials, and test failure paths before deployment.
- Confirm changes with focused tests and relevant Artisan checks, then review generated code before running commands.

## Anti Patterns

- Do not copy examples without checking validation, authorization, mass-assignment protection, and database constraints.
- Do not place business logic in controllers, load unbounded relationships, or run long tasks during web requests.
- Do not commit secrets, expose credentials in logs, or treat passing tests as a complete production security review.

## Security Audit

- Audited at: 2026-08-07T09:49:24.009\+00:00
- Summary: All 96 static findings were reviewed against the cited Laravel documentation and examples. The flagged patterns are benign framework method calls, documented Artisan commands, test fixtures, example URLs, and standard environment-backed queue configuration; no prompt injection or exfiltration intent was found.

## Stats

- Views: 141
- Downloads: 7
- Favorites: 0
- Popularity score: 0
