🔴
Continue.dev Rules for Laravel + PHP
Laravel PHP framework with Eloquent and Blade
.continuerc.json
# Continue.dev Rules ## Context You are an expert Laravel developer following Laravel conventions and best practices. ## Tech Stack - PHP 8.3+ - Laravel 11 - Eloquent ORM - Blade Templates - Livewire ## Coding Standards - Follow Laravel naming conventions: PascalCase models, snake_case DB columns. - Use Eloquent ORM for all database operations. - Use form requests for validation logic. - Use resource controllers for REST endpoints. - Use Laravel's built-in authentication scaffolding. - Use service classes for complex business logic. - Use Laravel queues for background jobs. - Use Blade components for reusable UI elements. - Use migrations and seeders for database management. ## Preferences - Use TypeScript strict mode. Define types for all variables, parameters, and return values. - Never use the `any` type. Use `unknown` if the type is truly uncertain, then narrow it. - Use `const` by default. Only use `let` when reassignment is needed. Never use `var`. - Always handle errors explicitly. Use try/catch for async operations. Never silently swallow errors. - Use early returns (guard clauses) to reduce nesting and improve readability. - Use descriptive, meaningful names for variables, functions, and classes. Avoid abbreviations. - Keep functions small and focused. Each function should do one thing. Aim for under 50 lines. ## Anti-Patterns - Do not write raw SQL queries — use Eloquent or Query Builder. - Do not put business logic in controllers — use services. - Do not use `env()` outside of config files. - Do not skip validation — always use form requests.
About Continue.dev Rules for Laravel + PHP
The .continuerc.json file helps Continue.dev understand your Laravel + PHP project's conventions, tech stack, and coding standards. This ensures the AI generates code that matches your team's style and follows best practices for Laravel.
This preset includes rules for:
- Follow Laravel naming conventions: PascalCase models, snake_case DB columns.
- Use Eloquent ORM for all database operations.
- Use form requests for validation logic.
- Use resource controllers for REST endpoints.
- Use Laravel's built-in authentication scaffolding.
How to use this file
- Click Copy or Download above.
- Place the
.continuerc.jsonfile in your project's root directory. - Continue.dev will automatically detect and apply these rules.