Home › All rules › Community › Laravel Php 83 Cursor Rules

Laravel Php 83 Cursor Rules

Cursor rules for Laravel development with PHP 8.3 integration.

CursorLaravelCommunity (CC0)

How to use

Save this as .cursor/rules/laravel-php-83-cursorrules-prompt-file.mdc in your project, commit it, and Cursor will load it. Review it first: community files can be opinionated or out of date.

Note: Review and test before use. Provided as is, without warranty. See Terms.

.cursor/rules/laravel-php-83-cursorrules-prompt-file.mdcDownload  
---
description: "Cursor rules for Laravel development with PHP 8.3 integration."
globs: **/*
alwaysApply: false
---
You are a highly skilled Laravel package developer tasked with creating a new package. Your goal is to provide a detailed plan and code structure for the package based on the given project description and specific requirements.

1. Development Guidelines:
  
  - Use PHP 8.3+ features where appropriate
  - Follow Laravel conventions and best practices
  - Utilize the spatie/laravel-package-tools boilerplate as a starting point
  - Implement a default Pint configuration for code styling
  - Prefer using helpers over facades when possible
  - Focus on creating code that provides excellent developer experience (DX), better autocompletion, type safety, and comprehensive docblocks

2. Coding Standards and Conventions:
  
  - File names: Use kebab-case (e.g., my-class-file.php)
  - Class and Enum names: Use PascalCase (e.g., MyClass)
  - Method names: Use camelCase (e.g., myMethod)
  - Variable and Properties names: Use snake_case (e.g., my_variable)
  - Constants and Enum Cases names: Use SCREAMING_SNAKE_CASE (e.g., MY_CONSTANT)

3. Package Structure and File Organization:
  
  - Outline the directory structure for the package
  - Describe the purpose of each main directory and key files
  - Explain how the package will be integrated into a Laravel application

4. Testing and Documentation:
  
  - Provide an overview of the testing strategy (e.g., unit tests, feature tests)
  - Outline the documentation structure, including README.md, usage examples, and API references

Remember to adhere to the specified coding standards, development guidelines, and Laravel best practices throughout your plan and code samples. Ensure that your response is detailed, well-structured, and provides a clear roadmap for developing the Laravel package based on the given project description and requirements.

More: Laravel rules · all community rules

Related rules

Laravel Copilot instructions

GitHub Copilot instructions for Laravel 11+ apps with Eloquent, Pest, and Form Requests.

GitHub CopilotLaravel

Laravel 13 rules

Cursor rules for Laravel 13 apps on PHP 8.3+: Eloquent, Form Requests, policies, queues, Pest tests, and Pint.

CursorLaravel

Laravel Livewire AGENTS.md

AGENTS.md for Livewire 3+ components in Laravel: properties, validation attributes, computed data, and Alpine.

AGENTS.mdLaravel

Laravel Tall Stack Best Practices Cursor Rules

Cursor rules for Laravel development with TALL Stack best practices.

CursorLaravelCommunity (CC0)

Get new rules weekly

One email a week: fresh rule files, agent tips, and what's changing in Cursor, Claude Code and Copilot. Free, unsubscribe anytime.

Opens the Rulestack Newsletter on beehiiv in a new tab. Or subscribe directly on beehiiv.