phantom-php/framework
最新稳定版本:v1.19.6
Composer 安装命令:
composer create-project phantom-php/framework
包简介
A minimalist but powerful PHP framework
README 文档
README
Phantom is a minimalist, elegant, and fast PHP framework, designed for developers seeking Laravel's structure with the lightness of a micro-framework.
🚀 Quick Installation
You can create a new Phantom project instantly using Composer:
composer create-project phantom-php/framework my-app
Or manually:
- Clone the repository.
- Run
composer install. - Copy
.env.exampleto.envand configure your credentials. - Start your server:
php phantom serve.
📖 Comprehensive Documentation
Our Documentation Manual covers everything you need to master Phantom:
- 🏗️ Core Architecture
- 🛣️ Advanced Routing & Method Injection
- 🛡️ Middlewares & Security
- ✅ Validation & Requests
- 🎨 Template Engine (Blade-like)
- 🗄️ ORM Relationships & Polymorphism
- 🗑️ Soft Deletes System
- 📦 Fluent Collections
- 🌐 API Resources (JSON)
- 🧪 HTTP Feature Testing
- 💻 Phantom CLI & Tinker (REPL)
Main Features
- 📦 IoC Container: Professional and powerful dependency management.
- 🛣️ Advanced Routing: Route Groups, Named Routes, Middlewares, and Method Injection.
- 🎨 View Engine: Blade-like template system with layouts, components, and caching.
- 🗄️ Phantom ORM: Active Record with Eager Loading, Relationships, Polymorphism, Soft Deletes, Attribute Casting, and Mass Assignment Protection.
- 🏢 Multi-Tenancy Core (v1.19.3): Native support for database and scope isolation (shared or separate DBs).
- ⏱️ Rate Limiting Pro (v1.19.4): Distributed sliding window algorithm for precise request throttling.
- ⚡ Distributed Cache (v1.19.5): High-performance caching with Redis Cluster support and automatic tenant isolation.
- 🤖 AI Native Integration: Built-in support for Gemini/OpenAI, Vector Embeddings, and AI-powered validation.
- 📟 Phantom Live: Build reactive, dynamic interfaces with PHP and Blade (Livewire-style).
- 📊 Phantom Pulse: Real-time telemetry dashboard for requests, DB queries, and security.
- 🛡️ Native Security: Zero-config Security Shield (IP Reputation), CSRF protection, and secure hashing.
- 📁 File Storage: Abstracted storage with Local, FTP, and S3 drivers.
- 📦 Distributed Queues: Background job processing with Redis Cluster and Sentinel support.
- 📝 API Auto-Doc: Generate OpenAPI/Swagger documentation automatically using AI.
- 🧪 Testing Suite: Built-in system for HTTP Feature Testing and unit tests.
- 💻 Phantom CLI: Professional toolkit including
serve,migrate,tinker, andai:generate.
Requirements
- PHP 8.1 or superior.
- Extensions: PDO, OpenSSL, Mbstring, Fileinfo, Readline (recommended).
Phantom CLI Quick Guide
# Start Server php phantom serve # Interactive REPL php phantom tinker # Run Migrations php phantom migrate # Generate Code php phantom make:model Post php phantom make:resource UserResource
License
This project is under the MIT License.
Designed with ❤️ for speed and elegance.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-30