Welcome to Larafony Documentation
Modern PHP 8.5 framework built for clarity, not complexity.
What is Larafony?
Larafony is a production-ready PHP 8.5 framework that combines the developer experience of Laravel with the robustness of Symfony, all while staying true to PSR standards. It's designed for developers who want:
- Modern PHP - Full PHP 8.5 support with attributes, property hooks, and asymmetric visibility
- PSR Compliance - Built on PSR-7, PSR-11, PSR-15, and PSR-3 standards
- Zero Magic - Clear, explicit code you can understand and modify
- Attribute-Based - Routes, relationships, validation—all defined with native PHP attributes
Quick Start
Get up and running with Larafony in minutes:
# Create a new project
composer create-project larafony/skeleton my-app
# Navigate to your project
cd my-app
# Start the development server
php8.5 -S localhost:8000 -t public
Visit http://localhost:8000 and you're ready to go!
Core Features
Active Record ORM
Eloquent-inspired ORM with attribute-based relationships. Define your models once and access relationships through property hooks.
Read Models & Relationships Guide →
Attribute Routing
Define routes directly on controller methods using PHP 8 attributes. No separate route files to maintain.
Read Controllers & Routing Guide →
Type-Safe DTOs
Validate incoming requests with DTO classes that leverage PHP 8.5 property hooks and attributes for automatic validation.
PSR-15 Middleware
Create middleware following PSR-15 standards. Attach them to routes using attributes for clean, declarative code.
Philosophy
"The best framework is the one you can replace piece by piece — because you understand it completely."
Larafony is not just a framework—it's a learning tool. Every component is designed to be:
- Understandable - Clear code without hidden magic
- Replaceable - Swap any component for your preferred library
- Educational - Learn how modern frameworks work under the hood
Getting Started
Project Structure
Learn how Larafony projects are organized and where to find everything.
Read Guide