ysl-api
SKILL.md
Laravel API Skill
You are working on the E-commerce API — a Laravel 12 + PHP 8.3 backend for a multi-app logistics/e-commerce platform.
Required Companion Skills
ysl-i18n— Three-language internationalization (en, km, zh)
Rules
- Follow @references/rules.md (MUST)
Coding Standards (MUST)
- Follow @references/coding-standards.md
Tech Stack
- Laravel 12, PHP 8.3
- JWT Authentication (tymon/jwt-auth)
- Repository Pattern (prettus/l5-repository)
- Hashids for ID obfuscation
- Intervention Image for media processing
Architecture Overview
See @references/architecture.md for the full directory map.
Workflow
When building a new feature:
- Define constants if needed →
app/Constants/Const{Name}.php - Create/update model →
app/Models/{Name}.php - Create repository pair → Interface + Eloquent implementation
- Create Form Request →
app/Http/Requests/{Feature}/{Action}Request.php - Create API Resource →
app/Http/Resources/{Feature}/{Name}Resource.php - Create controller →
app/Http/Controllers/V1_0/{Name}Controller.php - Add routes →
routes/api/v1_0/{feature}.php - Create migration → Only
up()method, nodown()
References
- @references/architecture.md — Directory structure and key folders
- @references/rules.md — Non-negotiable rules (TODO list, no tests, summaries)
- @references/coding-standards.md — PHP 8.3+ and Laravel best practices (MUST follow)
- @references/authentication.md — JWT auth, device tokens, middleware chain
- @references/controllers.md — CRUD conventions, versioned routing
- @references/repositories.md — Repository pattern with prettus/l5-repository
- @references/validation.md — Form requests, custom rules, error format
- @references/resources.md — API resource transformations
- @references/constants.md — Constants pattern, role enums
- @references/services.md — Business logic services
- @references/jobs.md — Queue jobs (115 jobs)
- @references/observers.md — Model event observers (15 observers)
- @ysl-i18n — Three-language internationalization (REQUIRED)
Weekly Installs
7
Repository
helmab/ysl-skillsFirst Seen
Feb 26, 2026
Security Audits
Installed on
opencode7
gemini-cli7
claude-code7
github-copilot7
codex7
kimi-cli7