PHPackages                             lldca/swoft-blade - 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. [Templating &amp; Views](/categories/templating)
4. /
5. lldca/swoft-blade

ActiveLibrary[Templating &amp; Views](/categories/templating)

lldca/swoft-blade
=================

swoft blade

v0.1.1(7y ago)332521MITPHPPHP &gt;=7.0

Since Oct 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jqhph/swoft-blade)[ Packagist](https://packagist.org/packages/lldca/swoft-blade)[ Docs](http://119.29.34.145)[ RSS](/packages/lldca-swoft-blade/feed)WikiDiscussions master Synced 3d ago

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

swoft-blade
===========

[](#swoft-blade)

Lavarel*5.6* blade模板引擎移植

### 安装

[](#安装)

需要把composer源切为`https://packagist.laravel-china.org`，或国外源。

运行： `composer require lldca/swoft-blade`

如果安装后使用有问题，请运行 `composer update` 更新下最新的swoft组件。

### Swoft配置

[](#swoft配置)

在配置文件 `config/properties/app.php` 结尾处添加如下配置：

```
'components' => [
    'custom' => [
        'Swoft\\Blade\\'
    ],
],
'blade-view' => [
    'path' => '@root/resources/views', // 默认模板路径
    'compiled' => '@root/runtime/views', // 编译模板缓存路径
    'namespaces' => [ // 视图命名空间

    ],
    'assets' => [ // 静态资源读取目录

    ],
    'read-assets' => true, // 开启加载静态资源
],
```

### 使用

[](#使用)

```
 /**
 * @RequestMapping("index")
 *
 * @return \Psr\Http\Message\ResponseInterface
 */
public function index()
{
    return blade('test::main.index', ['msg' => '测试'])
        ->toResponse()
        ->withAddedHeader('Content-Type', 'charset=utf-8');
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~77 days

Total

2

Last Release

2701d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ea3d2bc0d9483fa8a3bfa3a1e2e04e5f07375ff30a4f1777715e3e9778f3d51?d=identicon)[jqhph](/maintainers/jqhph)

---

Top Contributors

[![jqhph](https://avatars.githubusercontent.com/u/20312339?v=4)](https://github.com/jqhph "jqhph (24 commits)")

---

Tags

swoft blade

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lldca-swoft-blade/health.svg)

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

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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