Cursor Rules for Laravel

8 Laravel rules your agent actually follows: each one attaches only to the files it's about, states the version-specific behavior, and installs with one command.

Cursor Rules for Laravel cover

What it is

8 Cursor project rules (.mdc) for Laravel, scoped so each loads only when relevant, with an installer that detects your stack, an AGENTS.md exporter (Claude Code, Codex) and a rules linter. Written against current docs (checked Nov 2026).

What you get

The screenshot is real output from the kit’s own commands. Tested from a fresh download of this exact zip: ./run_tests.sh ran 8 tests OK on Python 3.13 and 3.10.

Real terminal output from Cursor Rules for Laravel: demo and passing tests

Install in 30 seconds

python3 tools/install_rules.py --detect /path/to/app          # what it finds
python3 tools/install_rules.py /path/to/app --auto            # install rules for detected stacks into .cursor/rules/
python3 tools/install_rules.py /path/to/app --all --agents-md # everything, plus AGENTS.md
python3 tools/lint_rules.py /path/to/app/.cursor/rules --project /path/to/app

Existing files are never overwritten unless you pass --force; --dry-run previews. ./tools/demo.sh runs it on examples/sample-app; ./run_tests.sh runs the tests. As a Cursor plugin, the manifest is .cursor-plugin/plugin.json.

The rules

RuleLoadsFirst instruction
laravel-overview.mdcalwaysCheck laravel/framework in composer.lock before using an API
laravel-eloquent.mdcby file (app/Models//*.php)Turn on Model::shouldBeStrict(! app()->isProduction()) in a service provider so lazy loading, missing attributes...
laravel-migrations.mdcby file (database/migrations/*.php)Create with php artisan make:migration create_orders_table
laravel-controllers-requests.mdcby file (app/Http//*.php, routes/*.php)Validate in Form Requests (php artisan make:request StoreOrderRequest) and use $request->validated()
laravel-queues-jobs.mdcby file (app/Jobs//*.php, app/Listeners//*.php, config/queue.php, routes/console.php)Jobs implementing ShouldQueue must be idempotent: they can run twice
laravel-security.mdcby file (config//*.php, app/Http//*.php, bootstrap/app.php, .env.example)Secrets live in .env (never committed) and are read through config(), not env(), outside config files
laravel-testing.mdcby file (tests//*.php)Use the repo's framework: Pest (Laravel 13 pairs with Pest 4) or PHPUnit 12
laravel-blade-livewire.mdcby file (resources/views//*.php, app/Livewire//*.php, app/View//*.php)Prefer Blade components (<x-button>) and slots over copy-pasted markup

Honest limits

  • Rules guide the model; they don't enforce anything. Check version-specific advice against the versions in your lockfile (each overview rule tells the agent to do this).
  • Detection is file-based (package.json, manage.py/requirements, Gemfile, supabase/); in monorepos run it per package or use --stack.

Format and license

Zip, 20 KB, v1.0, 31 files. You may use and modify this kit for your own work and for clients you serve, including paid client work. Not affiliated with or endorsed by Cursor (Anysphere) or Laravel.

FAQ

Laravel 12 or 13?
Both; the rules mark 13-only behavior (PreventRequestForgery, attributes, Queue::route) and tell the agent to check composer.lock first.
Will it overwrite my rules?
No, existing files are skipped unless you pass --force.
Claude Code or Codex?
Run the installer with --agents-md to write the same rules into AGENTS.md.
How do I get the files?
Right after payment, Stripe’s confirmation page shows your download link.
Refunds?
Email hello@youraitools.co within 14 days if it doesn’t work and we can’t fix it.
Can I pay with crypto?
Yes. Pay the same price in USDC or USDT on Base, Ethereum, Arbitrum, Optimism, Polygon or Solana from the "Pay with crypto" button, with no account or KYC. We check the payment on-chain and show your download links as soon as it confirms.

Get Cursor Rules for Laravel

8 Cursor rules for Laravel, written against current docs. Installs in one command, exports AGENTS.md for Claude Code and Codex. $12 once.

Save with a bundle

Pairs well with

DownloadFree

Laravel Cursor Rules Starter (Free)

Free Laravel Cursor rules in .mdc format, checked against current Laravel docs, plus a linter that shows why a rule isn't applying.

View Laravel Cursor Rules Starter (Free)
Download$12

Cursor Rules for FastAPI

7 Cursor rules for FastAPI, written against current docs. Installs in one command, exports AGENTS.md for Claude Code and Codex. $12 once.

View Cursor Rules for FastAPI
DownloadFree

FastAPI Cursor Rules Starter (Free)

Free FastAPI Cursor rules in .mdc format, checked against current FastAPI docs, plus a linter that shows why a rule isn't applying.

View FastAPI Cursor Rules Starter (Free)

Related