Welcome to Larafony Documentation

Modern PHP 8.5 framework built for clarity, not complexity.

Getting Started: New to Larafony? Start with the Project Structure guide to understand how everything is organized.

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:

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.

Read DTO Validation Guide →

PSR-15 Middleware

Create middleware following PSR-15 standards. Attach them to routes using attributes for clean, declarative code.

Read Middleware Guide →

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:

Getting Started

Project Structure

Learn how Larafony projects are organized and where to find everything.

Read Guide

Configuration & .env

Manage application configuration and environment variables.

Read Guide

Container (PSR-11)

Dependency injection container with automatic autowiring.

Read Guide

Controllers & Routing

Define routes with attributes and create RESTful controllers.

Read Guide

Database

Schema Builder & Migrations

Build database schemas with migrations using pipe operator.

Read Guide

Query Builder

Build and execute SQL queries with fluent, type-safe API.

Read Guide

Models & Relationships

Active Record ORM with attribute-based relationships.

Read Guide

Views & Validation

Views & Blade

Build dynamic views with Blade templates and components.

Read Guide

DTO Validation

Validate requests with type-safe DTOs and property hooks.

Read Guide

HTTP & Logging

Middleware

Create PSR-15 compliant middleware for request/response processing.

Read Guide

HTTP Client (PSR-18)

Make HTTP requests to external APIs with PSR-18 client.

Read Guide

Logging (PSR-3)

Track application events with PSR-3 compliant logging.

Read Guide