Laravel App taste — ChatGPT prompt for Laravel
The Laravel App taste ChatGPT prompt sets practical conventions for building Laravel and PHP apps. It guides work on controllers, validation, queues, tests, and deployment.
CC0-1.0 ★ 178,201 updated 2026-10-24
Open on GitHubWhat Laravel App taste does
The prompt sets a Laravel development style: keep controllers thin, validate through Form Request classes, and move business logic into action classes. It recommends API Resources for shaping responses and foreign keys plus unique indexes to back database relationships.
Its guidance covers Sanctum for SPA and mobile authentication, Pest or PHPUnit feature tests against a real database with RefreshDatabase, and Laravel Pint with Larastan in CI. Slow tasks go to queued jobs running under Horizon, and jobs should be idempotent. Scheduled work uses withoutOverlapping and onOneServer rather than raw crontab entries.
The prompt also addresses migrations, config and route caching, uploads to S3-compatible storage, and upgrading Laravel one major version at a time. It recommends Passport for full OAuth, while Sanctum is its choice for SPA and mobile authentication.
What it helps with
- move business logic out of controllers
- validate and authorize incoming requests
- set up Laravel feature tests with a database
- send slow work to queued jobs
- review deployment and upgrade practices
Example prompts for the agent
- Apply the Laravel App taste prompt to this Laravel project.
- Review these controllers and Form Request classes using Laravel App taste.
- Draft a test and deployment plan for this project based on Laravel App taste.
How to install Laravel App taste
How to use
Paste the text at the start of a chat or into project instructions
Manually: put the files in place
.claude/commands/prompts.csv.mdQuestions about Laravel App taste
How do I install Laravel App taste in Claude Code?
Place the prompt file at .claude/commands/prompts.csv.md. That is the path provided for Claude Code.
What does Laravel App taste do?
It sets Laravel development conventions for controllers, business logic, database work, tests, queues, and deployment.
Which authentication packages does the prompt recommend?
It recommends Sanctum for SPA and mobile authentication, and Passport when full OAuth is needed.
Source text
prompts.csv · CC0-1.0
# Laravel App taste of a pragmatic PHP web developer - Start on the latest Laravel and PHP versions with strict types declared in every file. Confidence: 0.85 - Keep controllers thin and resourceful, with single-action invokable controllers for anything that is not CRUD. Confidence: 0.85 - Validate input in Form Request classes and authorize it with policies instead of inline checks in controllers. Confidence: 0.90 - Put business logic in small action classes like CreateInvoice, not in controllers, models or route closures. Confidence: 0.75 - Use Eloquent with explicit $fillable fields or casts, and never call Model::unguard in production code. Confidence: 0.85 - Turn on Model::preventLazyLoading outside production to catch N+1 queries early, and fix them with eager loading. Confidence: 0.90 - Back every relationship with foreign keys and unique indexes in migrations, not only with Eloquent rules. Confidence: 0.90 - Write migrations that are safe to roll forward and never edit one that has already run in production. Confidence: 0.90 - Shape API responses with API Resources so the database schema never leaks directly into JSON. Confidence: 0.85 - Push slow work like email, exports and third-party calls to queued jobs running under Horizon, and make every job idempotent. Confidence: 0.90 - Use events and listeners only for real side effects, not to hide the main flow of a request. Confidence: 0.75 - Read config through config() and keep env() calls inside config files only, so config caching works. Confidence: 0.95 - Run php artisan optimize, config:cache and route:cache as part of every deploy. Confidence: 0.85 - Use Sanctum for first-party SPA and mobile auth, and reach for Passport only when you need full OAuth. Confidence: 0.80 - Test with Pest or PHPUnit using feature tests against a real database with RefreshDatabase. Confidence: 0.85 - Build test data with model factories and states instead of large shared seed files. Confidence: 0.80 - Enforce formatting with Laravel Pint and static analysis with Larastan at level 6 or higher in CI. Confidence: 0.85 - Prefer Livewire or Inertia with the Laravel starter kits before building a separate SPA. Confidence: 0.75 - Rate limit login and public API routes with named rate limiters. Confidence: 0.90 - Store uploads through the Storage facade on S3-compatible disks and serve private files via temporary signed URLs. Confidence: 0.85 - Schedule recurring tasks in the scheduler with withoutOverlapping and onOneServer, not in raw crontab entries. Confidence: 0.85 - Keep packages few and well maintained, and upgrade one major Laravel version at a time using the official upgrade guide. Confidence: 0.80
© f · CC0-1.0 · f/prompts.chat