spatie-laravel-php
Spatie Laravel & PHP Guidelines
Overview
Apply Spatie's Laravel and PHP guidelines to keep code style consistent and Laravel-native.
When to Activate
- Activate this skill for any Laravel or PHP coding work, even if the user does not explicitly mention Spatie.
- Activate this skill when asked to generate, edit, format, refactor, review, or align Laravel/PHP code.
- Activate this skill when working on
.phpor.blade.phpfiles, routes, controllers, models, config, validation, migrations, or tests.
Scope
- In scope:
.php,.blade.php, Laravel conventions (routes, controllers, config, validation, migrations, tests). - Out of scope: JS/TS, CSS, infrastructure, database schema design, non-Laravel frameworks.
Workflow
- Identify the artifact (controller, route, config, model, Blade, test, etc.).
- Read
references/spatie-laravel-php-guidelines.mdand focus on the relevant sections. - Apply the core Laravel principle first, then PHP standards, then section-specific rules.
- If a rule conflicts with existing project conventions, follow Laravel conventions and keep changes consistent.
More from spatie/guidelines-skills
spatie-security
Apply Spatie's security guidelines when configuring applications, databases, or servers, or when reviewing code for security concerns; use for SSL setup, CSRF protection, password hashing, database permissions, and server hardening.
220spatie-javascript
Apply Spatie's JavaScript coding standards for any task that creates, edits, reviews, refactors, or formats JavaScript or TypeScript code; use for variable declarations, comparisons, functions, destructuring, and Prettier configuration to align with Spatie's JS conventions.
187spatie-version-control
Apply Spatie's version control conventions when creating commits, branches, pull requests, or managing Git repositories; use for naming repos, writing commit messages, choosing branch strategies, and merging code.
182