PHPackages                             pagon/pagon - 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. pagon/pagon

ActiveLibrary

pagon/pagon
===========

Pagon starter app

0.8.3(11y ago)19963525[2 issues](https://github.com/hfcorriez/pagon/issues)1MITPHPPHP &gt;=5.3.9

Since Apr 2Pushed 11y ago30 watchersCompare

[ Source](https://github.com/hfcorriez/pagon)[ Packagist](https://packagist.org/packages/pagon/pagon)[ RSS](/packages/pagon-pagon/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (22)Used By (1)

Pagon
=====

[](#pagon)

Pagon is Modern PHP framework with elegant syntax. It also allow you to build RESTful web applications quickly and easily.

Other languages: [中文文档](https://github.com/hfcorriez/pagon/blob/master/README_CN.md)

Quick Started
-------------

[](#quick-started)

### Installation

[](#installation)

Pagon use [Composer](https://getcomposer.org/) to manage its dependencies. First you need to have `Composer` installed globally.

You can also download a copy of the `composer.phar` in your repository's root, run a command such as the following:

```
curl -s https://getcomposer.org/installer | php
```

#### via Download/Git

[](#via-downloadgit)

[Download](https://github.com/hfcorriez/pagon/releases/latest) source files from Github or clone from Github

```
$ git clone git@github.com:hfcorriez/pagon.git myapp
$ composer install # php composer.phar install
```

#### Via Composer Create-Project

[](#via-composer-create-project)

```
$ composer create-project pagon/pagon myapp # php composer.phar ...
```

### Debugger server

[](#debugger-server)

You can use Pagon built-in debugger server for rapid development under development environment. please use a ` Nginx` or `Apache` server for production environment.

```
$ ./bin/pagon serve [-p|--port ]
Pagon serve at http://127.0.0.1:5000
```

Configuration
-------------

[](#configuration)

All of the configuration files for the Pagon are stored in the `app/config` directory.

Optional attributes

```
mode        # Runing mode
debug       # Debug mode
views       # Template directory
buffer      # Open a buffer or not
timezone    # timezone (default: UTC)
charset     # charset (default: UTF-8)
autoload    # Auto load directory
error       # Handle error or not
routes      # Routes
names       # Router name, auto created
alias       # Class aliases, for short class name
namespaces  # Namespaces
engines     # Template engines
errors      # Default errors
stacks      # stacks
mounts      # mounts
bundles     # bundles
locals      # locals
url_rewrite # Url rewrite or not

```

Routing
-------

[](#routing)

To get started, let's create our first route. In Pagon, the simplest route is a route to a Closure.

```
// Init app
$app = Pagon::create();

// Routing with a callback function
$app->get('/', function($req, $res) {
  $res->render('index.php');
});

// Routing with a class method
$app->get('/users/:id', 'Web\\User');

// Specify named parameters in your routes
$app->post('/users/:id(/:op)', 'Web\\UserOperator');

// Run app
$app->run();
```

Database
--------

[](#database)

Pagon ships with a superb ORM: Paris. More detailed documentation and examples, please check out [Paris Doc](http://paris.readthedocs.org/en/latest/philosophy.html).

Simple Example

```
$users = \Model\User::dispense()->where('status', 1)->find_many();
```

Migration
---------

[](#migration)

Init Database schema

```
./bin/cli db:init
```

> Will execute file `app/migrations/schema.sql`

Migrate, Status

```
$ ./bin/cli db:generate AddUserLoginTime
+f ./migrations/20141208030747_AddUserLoginTime.php

$ ./bin/cli db:status

 Status   Migration ID    Migration Name
-----------------------------------------
   down  20141208030747  AddUserLoginTime

$ ./bin/cli db:migrate
 == 20141208030747 AddUserLoginTime migrating
 == 20141208030747 AddUserLoginTime migrated 0.0084s
```

> Except `init` command, all the other commands map to [phpmig](https://github.com/davedevelopment/phpmig) to execute。

Cli
---

[](#cli)

> Manage PHP shell for \*unix console

`./bin/cli`

```
$app->command('db\:init', '\Command\DB\Init');
$app->command('queue\:start', '\Command\Queue\Start');
```

Execution

```
$ ./bin/cli db:init
$ ./bin/cli queue:start
```

Showcase
--------

[](#showcase)

iNews:

License
-------

[](#license)

Copyright (c) 2014-2015 hfcorriez. MIT Licensed, see [LICENSE](https://github.com/hfcorriez/pagon/blob/master/LICENSE.md) for details.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Recently: every ~86 days

Total

21

Last Release

4171d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/052da9fcd2d35025de486c255a8b4d38a67b2626b6ca626f6681bbc00187e62b?d=identicon)[hfcorriez](/maintainers/hfcorriez)

---

Top Contributors

[![hfcorriez](https://avatars.githubusercontent.com/u/119550?v=4)](https://github.com/hfcorriez "hfcorriez (866 commits)")[![BelinChung](https://avatars.githubusercontent.com/u/4954264?v=4)](https://github.com/BelinChung "BelinChung (6 commits)")

---

Tags

frameworkpagonphppagonskelton

### Embed Badge

![Health badge](/badges/pagon-pagon/health.svg)

```
[![Health](https://phpackages.com/badges/pagon-pagon/health.svg)](https://phpackages.com/packages/pagon-pagon)
```

###  Alternatives

[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

41.5k328.9k1](/packages/ccxt-ccxt)[react/react

ReactPHP: Event-driven, non-blocking I/O with PHP.

9.1k3.6M63](/packages/react-react)[php-pm/php-pm

PHP-PM is a process manager, supercharger and load balancer for PHP applications.

6.6k441.3k8](/packages/php-pm-php-pm)[clue/framework-x

Framework X – the simple and fast micro framework for building reactive web applications that run anywhere.

936736.7k8](/packages/clue-framework-x)[web3p/web3.php

Ethereum web3 interface.

1.3k325.5k41](/packages/web3p-web3php)[atymic/twitter

Twitter API for PHP &amp; Laravel

945555.4k2](/packages/atymic-twitter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
