PluginBench
Rule

laravel php 83

via PatrickJS/awesome-cursorrules

Laravel package development with PHP 8.3 features, conventions, and DX-focused tooling.

What is laravel php 83?

Guidance for creating Laravel packages using PHP 8.3+ features, spatie/laravel-package-tools, and Laravel best practices. Use this when building reusable Laravel packages that prioritize developer experience, type safety, and modern PHP standards.

  • Apply PHP 8.3+ syntax and features appropriately in package code
  • Follow Laravel naming conventions (kebab-case files, PascalCase classes, camelCase methods, snake_case properties)
  • Structure packages using spatie/laravel-package-tools boilerplate and Laravel conventions
  • Configure Pint for consistent code styling across the package
  • Prefer helpers over facades for better DX and autocompletion
  • Generate comprehensive docblocks and type hints for type safety and IDE support

Applies to

File patterns this rule matches.

**/*
Rule definition (reference)

Source of truth, from the repository.

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
  1. 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)
  1. 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
  1. 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.

Related rules

Senior full-stack TypeScript, React, Node.js guidance with clean architecture, testing, and WHY-oriented reasoning.

**/*
41k
via PatrickJS/awesome-cursorrules

Quantitative factor research skills for designing, evaluating, and mining alpha factors in equities markets.

**/*
41k
via PatrickJS/awesome-cursorrules

Android development with Jetpack Compose, clean architecture, and Material Design 3.

**/*
41k
via PatrickJS/awesome-cursorrules

Angular development with Novo Elements UI library using standalone components.

**/*
41k
via PatrickJS/awesome-cursorrules

Expert Angular 18 + TypeScript development with Jest, emphasizing clean code and performance.

**/*
41k
via PatrickJS/awesome-cursorrules

Manage Kubernetes clusters, add-ons, stacks, and credentials via the Ankra CLI platform.

**/*.sh +5
41k
via PatrickJS/awesome-cursorrules