PHP后端开发说明

Guide PHP backend development with ThinkPHP 6.x layered architecture and CRMEB-aligned standards.

9.2k|2.1k|Updated Oct 27, 2018
One-click install
npx skills add https://github.com/crmeb/CRMEB --skill php-crmeb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: PHP后端开发说明
Source: https://github.com/crmeb/CRMEB/tree/main/.trae/skills/php-api
Command: npx skills add https://github.com/crmeb/CRMEB --skill php-crmeb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CRMEB's PHP backend development guide provides a structured blueprint for building scalable ThinkPHP-based backends, covering architecture, core modules (controller, service, dao, model, routing, middleware, validation), coding standards, API design, error handling, testing, deployment, and maintenance to reduce duplication and enforce consistency across projects.

Core Features & Use Cases

  • ThinkPHP 6.x based backend architecture with MVC + Service + DAO separation.
  • Core modules: Controller, Service, DAO, Model, Route, Validation, Middleware, Event.
  • Development standards: PHP PSR conventions, naming conventions, API design, error handling, and security practices.
  • Documentation and references: references/api_create.md, references/db_design.md, references/error_code.md, and directory_structure.md for consistent guidance.
  • Deployment & maintenance practices: testing, CI/CD integration, monitoring, and structured upgrade paths.

Quick Start

Create a small backend feature following the documented architecture, including designing routes, controllers, services, and tests, then deploy to a staging environment.

Frequently Asked Questions about PHP后端开发说明

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a PHP backend using MVC and Service layers in ThinkPHP 6?

Structure a ThinkPHP 6 PHP backend using MVC + Service + DAO layered architecture to separate routing, controllers, models, and data access. This enforces consistency and reduces duplication across projects.

What is the best way to design APIs in a ThinkPHP 6 backend?

Design ThinkPHP 6 APIs by following coding standards, validation, and error handling guidelines. Use references like api_create.md and error_code.md to ensure consistent API endpoint design and structured responses.

Does this PHP backend guide cover CI/CD integration and deployment testing?

Yes, the PHP backend guide covers deployment and maintenance practices, including CI/CD integration, monitoring, and testing workflows to ensure stable upgrades and operational best practices.

How do I handle error handling and security in PHP backend development?

Handle PHP backend errors and security by applying PSR conventions, structured error codes, and middleware. Follow the documented best practices for admin interfaces and API services.

Can I use this guide for database design and directory structure in ThinkPHP?

Yes, the guide includes db_design.md and directory_structure.md references, providing structured blueprints for database design and directory organization in ThinkPHP-based backend projects.