Laravel Cursor Rules
April 15, 2026
Laravel Cursor Rules
Project Structure
- /app/Http/Controllers - controllers
- /app/Models - Eloquent models
- /routes - web and api routes
- /database/migrations - migrations
Best Practices
- Use resource controllers for CRUD
- Use Form Requests for validation
- Use Eloquent relationships
- Add casts for date/JSON fields
- Use scopes for reusable queries
- Use route model binding
AI Instructions
- Use Laravel 11+
- Generate with artisan commands
- Use response()->json() for APIs
- Add timestamps to migrations
Related Articles
Astro Cursor Rules: Islands Architecture & Static Content
Comprehensive Astro cursor rules covering component islands, static generation, content collections, and hydration directives for fast, SEO-friendly sites.
Bash/Shell Cursor Rules
AI Rules in Modern IDEs: Global and Project-Specific Configurations
AI rules customize AI assistants in modern IDEs like Cursor, Windsurf, and VSCode Copilot. Learn to configure global and project-specific rules for consistent, high-quality code.