Skills may execute instructions and code that could affect your environment. Marketplace scans reduce risk but do not guarantee safety. Always review files, run your own security checks, and use at your own risk.
Php Developer
Security Scan Summary
Status: Safe
Source: Syntic Skills registry
Automated security scan completed with no high-risk patterns detected. Manual review is still required.
About This Skill
Use when building modern web applications with PHP 8.3+ and Laravel 11, featuring Eloquent ORM, queues, and middleware.
Downloadable SKILL.md
Download SKILL.md and place it in your Syntic skills folder. For Syntic Code, install in your local skills directory, review contents, and run in a controlled environment first. Acknowledge the risk notice above to enable the download.
---
name: Php Developer
description: Use when building modern web applications with PHP 8.3+ and Laravel 11, featuring Eloquent ORM, queues, and middleware.
category: Languages
version: 1.0.0
tools: []
---
# PHP 8.3+ & Laravel 11 Development
Build modern, production-ready web applications using PHP 8.3+ strict types and Laravel 11 framework patterns.
## Core Principles
- Add `declare(strict_types=1)` to every file; use typed properties, return types, union types
- Follow Laravel conventions for routing, middleware, request lifecycle
- Always eager-load Eloquent relationships; paginate results; avoid N+1 queries
- Use Composer for dependencies; pin versions; run `composer audit` regularly
## PHP 8.3+ Features
- Use `readonly` classes for DTOs and value objects; all properties implicitly readonly
- Use `BackedEnum` for database-storable type-safe values: `enum Status: string { case Active = 'active'; }`
- Use named arguments: `createUser(name: $name, role: Role::Admin)`
- Use `match` expressions instead of `switch` with strict comparison
- Use first-class callable syntax: `array_map($this->transform(...), $items)`
## Laravel 11 Architecture
```
app/Http/Controllers/ # Thin controllers, single responsibility
app/Models/ # Eloquent models with scopes, casts, relations
app/Services/ # Business logic
app/Actions/ # Single-purpose action classes
app/Enums/ # PHP 8.1+ backed enums
app/Jobs/ # Queued background jobs
```
## Eloquent Best Practices
- Define relationships explicitly: `hasMany`, `belongsTo`, `belongsToMany`, `morphMany`
- Use `with()` for eager loading: `User::with(['posts', 'posts.comments'])->get()`
- Use query scopes: `scopeActive`, `scopeCreatedAfter`
- Use attribute casting: `'metadata' => 'array'`, `'status' => Status::class`
- Use `chunk()` or `lazy()` for large datasets
- Use `upsert()` for bulk insert-or-update; `updateOrCreate()` for single records
## API & Queues
- Use API Resources for response transformation
- Use Form Requests for validation; return `$request->validated()`
- Use Sanctum for token-based API authentication
- Use Laravel Horizon with Redis for queue management
- Make jobs idempotent; use `ShouldBeUnique` to prevent duplicates
- Set `$tries`, `$backoff`, `$timeout` on every job class
## Testing
- Use Pest PHP for expressive test syntax
- Use `RefreshDatabase` trait; use `LazilyRefreshDatabase` for speed
- Use model factories: `Factory::new()->create()`
- Use `Http::fake()` for mocking HTTP; `Queue::fake()` for job assertions
- Test validation, authorization, error paths, not just success cases
## Before Completing
- Run `php artisan test` or `./vendor/bin/pest`
- Run `./vendor/bin/phpstan analyse` at level 8
- Run `./vendor/bin/pint` for code formatting
- Run `php artisan route:list` to verify routes
Bundle Download
Includes SKILL.md and bundled support files where provided. Risk acknowledgement is required.
Install Targets
Syntic App
- 1. Create a dedicated folder for this skill in your local skills library.
- 2. Place SKILL.md into that folder.
- 3. Restart Syntic and invoke this skill on matching tasks.
Syntic Code (CLI)
- 1. Save SKILL.md in your local Syntic Code skills directory.
- 2. Keep related files in the same skill folder.
- 3. Run in a safe environment and validate outputs.
Source
https://github.com/rohitg00/awesome-claude-code-toolkit/blob/main/agents/language-experts/php-developer.md
Open Source LinkRelated Skills
Angular Architect
Use when building enterprise applications with Angular 17+, signals, standalone components, RxJS, and NgRx...
LanguagesClojure Developer
Use when building data-oriented systems with Clojure, REPL-driven development, persistent data structures...
LanguagesCsharp Developer
Use when building applications on .NET 8+ with ASP.NET Core, Entity Framework Core, minimal APIs, and async...
LanguagesDjango Developer
Use when building applications with Django 5+ and Django REST Framework, including ORM optimization...