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

ActiveLibrary[Framework](/categories/framework)

layton/layton
=============

The Layton PHP framework

226PHP

Since Jun 30Pushed 8y agoCompare

[ Source](https://github.com/Jinxes/layton)[ Packagist](https://packagist.org/packages/layton/layton)[ RSS](/packages/layton-layton/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Layton Web Framework.
=====================

[](#layton-web-framework)

Layton 是什么？
-----------

[](#layton-是什么)

Layton 是一个基于 PHP 语言的网络框架

Layton 提倡用最简单直接的方式进行开发，从零开始构建自己的应用程序

Layton 提供一个极度自由的松耦合架构，最大限度的迎合使用者的思维方式和编程习惯。

Layton 提供了什么？
-------------

[](#layton-提供了什么)

- 标准的 PSR-7 http 通信组件
- 高度自由的 URL 路由
- PSR-11 标准容器(PSR Container)
- 高效的依赖注入驱动

如何安装？
-----

[](#如何安装)

```
composer require layton/layton dev-master
```

两种风格的 Hello World
-----------------

[](#两种风格的-hello-world)

1. *极简风格*

```
use Layton\Library\Http\Response;

$app = new \Layton\App();

$app->get('/', function (Response $response) {
    return $response->html('Hello World!');
});

$app->start();
```

2. *装饰器风格*

```
use Layton\Library\Http\Response;

$app = new \Layton\App();

$app->route('/', ['GET'])
(function(Response $response) {
    return $response->html('Hello World!');
});

$app->start();
```

获取更多帮助
------

[](#获取更多帮助)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/37512869?v=4)[Jinxes](/maintainers/Jinxes)[@Jinxes](https://github.com/Jinxes)

---

Top Contributors

[![Jinxes](https://avatars.githubusercontent.com/u/37512869?v=4)](https://github.com/Jinxes "Jinxes (49 commits)")[![winter-sleep](https://avatars.githubusercontent.com/u/34293726?v=4)](https://github.com/winter-sleep "winter-sleep (12 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M290](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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