PHPackages                             pagemill/mvc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. pagemill/mvc

ActiveLibrary[Framework](/categories/framework)

pagemill/mvc
============

3.0.0(2mo ago)0191BSD-3-ClausePHPPHP ^8.2CI failing

Since Mar 2Pushed 2mo agoCompare

[ Source](https://github.com/dealnews/pagemill-mvc)[ Packagist](https://packagist.org/packages/pagemill/mvc)[ RSS](/packages/pagemill-mvc/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (1)

PageMill MVC
============

[](#pagemill-mvc)

[![PHP Version](https://camo.githubusercontent.com/c9f64f714c636ba27a3bba6dfd52f98426832db1262747efa54b212d16943651/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e322d626c7565)](https://www.php.net/)[![License](https://camo.githubusercontent.com/e32287373926ec416e0928698ca4471080dc41437461969806bcfe2df245e480/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d2d332d2d436c617573652d677265656e)](LICENSE)[![Tests](https://camo.githubusercontent.com/e764392f8dde042a24f66f16bd260f2b4c33ac247604a9373e21e556f787ac11/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d33363825323070617373696e672d627269676874677265656e)](tests/)[![Coverage](https://camo.githubusercontent.com/6dd269e2b321367f673d084b2ef7256bffd801907a45395af0e675eba5314d17/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d31303025323525323066696c65732d627269676874677265656e)](tests/README.md)

A lightweight, modern PHP MVC framework focused on developer experience and clean architecture. PageMill MVC provides the essential building blocks for web applications without the bloat, making it perfect for developers who want control without complexity.

**Why PageMill MVC?** Built for modern PHP (8.2+), fully type-hinted, extensively tested (368 tests, 100% file coverage), and designed around proven patterns. It's the MVC framework that gets out of your way and lets you build.

Features
--------

[](#features)

- ✅ **Full MVC Architecture** - Complete separation of concerns with Controllers, Models, Views, and Actions
- 🎨 **Asset Management** - Built-in CSS/JS asset handling with combining, minification, and cache busting
- 📄 **Multiple Response Types** - HTML templates, JSON APIs, and custom formats out of the box
- 🔧 **Component System** - Reusable UI elements with automatic asset injection
- 🎯 **Content Negotiation** - Automatic format detection and response generation based on Accept headers
- 📦 **Property Mapping** - Type-safe array-to-object mapping with validation
- ⚡ **Lightweight** - No bloat, just the essentials you need
- 🧪 **Fully Tested** - 368 tests with comprehensive coverage
- 🔍 **Modern PHP** - Requires PHP 8.2+, fully type-hinted with strict types
- 📚 **Well Documented** - Complete PHPDoc blocks and extensive test examples

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Composer

Installation
------------

[](#installation)

Install via Composer:

```
composer require pagemill/mvc
```

The framework will automatically install its dependencies:

- `pagemill/http` - HTTP request/response handling
- `dealnews/filter` - Input filtering and validation
- `pagemill/accept` - Content-type negotiation

Quick Start
-----------

[](#quick-start)

Here's a minimal example to get you up and running in under 5 minutes:

### 1. Create a Simple Controller

[](#1-create-a-simple-controller)

```
