PHPackages                             topthink/think-view - 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. topthink/think-view

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

topthink/think-view
===================

thinkphp template driver

v2.0.5(1y ago)15787.2k—6.1%11[3 issues](https://github.com/top-think/think-view/issues)[1 PRs](https://github.com/top-think/think-view/pulls)20Apache-2.0PHPPHP &gt;=8.0.0

Since Jan 20Pushed 1y ago2 watchersCompare

[ Source](https://github.com/top-think/think-view)[ Packagist](https://packagist.org/packages/topthink/think-view)[ RSS](/packages/topthink-think-view/feed)WikiDiscussions 2.0 Synced 3d ago

READMEChangelog (10)Dependencies (1)Versions (23)Used By (20)

think-view
==========

[](#think-view)

ThinkPHP8.0 Think-Template模板引擎驱动

安装
--

[](#安装)

```
composer require topthink/think-view
```

用法示例
----

[](#用法示例)

本扩展不能单独使用，依赖ThinkPHP8.0+

首先配置config目录下的template.php配置文件，然后可以按照下面的用法使用。

```
use think\facade\View;

// 模板变量赋值和渲染输出
View::assign(['name' => 'think'])
	// 输出过滤
	->filter(function($content){
		return str_replace('search', 'replace', $content);
	})
	// 读取模板文件渲染输出
	->fetch('index');

// 或者使用助手函数
view('index', ['name' => 'think']);
```

具体的模板引擎配置请参考think-template库。

###  Health Score

51

—

FairBetter than 95% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community33

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 96.4% 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 ~107 days

Recently: every ~17 days

Total

22

Last Release

473d ago

Major Versions

v1.0.14 → v2.0.02023-02-25

PHP version history (2 changes)v1.0.0PHP &gt;=7.1.0

v2.0.0PHP &gt;=8.0.0

### Community

Maintainers

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

---

Top Contributors

[![liu21st](https://avatars.githubusercontent.com/u/1111670?v=4)](https://github.com/liu21st "liu21st (53 commits)")[![big-dream](https://avatars.githubusercontent.com/u/9215157?v=4)](https://github.com/big-dream "big-dream (1 commits)")[![yunwuxin](https://avatars.githubusercontent.com/u/2168125?v=4)](https://github.com/yunwuxin "yunwuxin (1 commits)")

### Embed Badge

![Health badge](/badges/topthink-think-view/health.svg)

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

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