Speed up Laravel development by giving Cursor a set of rules that understand Laravel conventions, so the AI produces ready‑to‑run models, controllers, Blade views, Livewire components, and tests without the usual manual clean‑up.
What You Get
- eloquent-rules.json – Generates models and relationship definitions that follow Laravel best practices, including proper attribute casting and relationship methods.
- blade-rules.json – Creates Blade components and view files that respect Laravel’s folder structure, naming conventions, and component registration patterns.
- livewire-rules.json – Produces Livewire components with correctly wired lifecycle hooks, validation rules, and data binding that match typical Laravel projects.
- controller-rules.json – Standardizes controller methods, ensuring request validation, resource responses, and dependency injection are applied consistently.
- test-rules.json – Writes feature and unit tests that align with Laravel’s testing utilities, using proper test case classes and assertion styles.
How to Use
- Copy the provided
.json rule files into the Cursor configuration directory used by your IDE.
- Restart Cursor or reload its configuration so the new rule set is recognized.
- When prompting Cursor for a Laravel artifact—such as a model, view, or Livewire component—select the appropriate rule set or let Cursor apply the rules automatically based on file type.
- Review the generated code; it will already follow Laravel naming, folder placement, and coding conventions, requiring minimal or no manual adjustments.
- Commit the generated files to your codebase, and continue building features without spending time refactoring AI‑generated boilerplate.
Who This Is For
- Laravel developers who regularly use AI assistance and need the output to match their project's standards.
- Teams that want to keep a consistent code style across models, controllers, Blade templates, and Livewire components.
- Developers who are tired of rewriting generic snippets to fit Laravel’s conventions and want to reduce repetitive scaffolding work.
- Anyone looking to lower the amount of time spent on AI‑generated errors and improve overall development efficiency.