PHPackages                             phpnomad/framework - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. phpnomad/framework

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phpnomad/framework
==================

2.1.2(3w ago)04.0k[3 PRs](https://github.com/phpnomad/framework/pulls)2MITPHPCI failing

Since Apr 25Pushed 3w ago2 watchersCompare

[ Source](https://github.com/phpnomad/framework)[ Packagist](https://packagist.org/packages/phpnomad/framework)[ Docs](https://github.com/phpnomad/core)[ RSS](/packages/phpnomad-framework/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (18)Versions (16)Used By (2)

phpnomad/framework
==================

[](#phpnomadframework)

[![Latest Version](https://camo.githubusercontent.com/8f2f1031e0967d2b2a3fe87ccabe8f86d137689e185faca97644e77e04b41040/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068706e6f6d61642f6672616d65776f726b2e737667)](https://packagist.org/packages/phpnomad/framework)[![Total Downloads](https://camo.githubusercontent.com/68efa6cbf242780ed2697a405838a18ab2d2f53990fc783a2ae8a9f9bfb3a695/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068706e6f6d61642f6672616d65776f726b2e737667)](https://packagist.org/packages/phpnomad/framework)[![PHP Version](https://camo.githubusercontent.com/0d933117695ad3217ead573050d4e7efd35487516853a846f2c0c823e774b436/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7068706e6f6d61642f6672616d65776f726b2e737667)](https://packagist.org/packages/phpnomad/framework)[![License](https://camo.githubusercontent.com/3eaf641bc8920700d8ed2f51f330e4b7d0668fd7f2d2f677df4b0247a15726f6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068706e6f6d61642f6672616d65776f726b2e737667)](https://packagist.org/packages/phpnomad/framework)

`phpnomad/framework` is the cross-package catch-all for PHPNomad. It's where the controller traits, middlewares, validations, events, and small helper interfaces live when they're useful across several packages but don't belong to any single one. Rather than rewriting the same POST handler or uniqueness check in every package that needs it, those patterns get lifted into `phpnomad/framework` so they can be reused.

The package depends on `phpnomad/db`, `phpnomad/di`, `phpnomad/event`, `phpnomad/rest`, and `phpnomad/logger`, which tells you most of what it touches. It isn't a single coherent concept, and the README won't pretend otherwise. It's a kitchen drawer for the recurring patterns that show up once you've built a few PHPNomad services and noticed the repetition.

PHPNomad has been in production for years, powering [Siren](https://sirenaffiliates.com) along with several MCP servers and client systems. The traits and middlewares in this package are the same ones those production systems depend on.

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

[](#installation)

```
composer require phpnomad/framework
```

Composer will pull in the peer packages listed above automatically.

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

[](#quick-start)

Here's a typical REST controller that uses `CreateController` to handle a POST endpoint. The trait supplies the create flow, datastore call, and error handling, while the class itself defines validations, middleware, and how the request maps into model attributes.

```
