PHPackages                             qq958691165/tp3-lara-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. qq958691165/tp3-lara-blade

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

qq958691165/tp3-lara-blade
==========================

v0.3.0(4y ago)0247MITPHPPHP &gt;=7.2

Since Jul 9Pushed 4y ago1 watchersCompare

[ Source](https://github.com/qq958691165/tp3-lara-blade)[ Packagist](https://packagist.org/packages/qq958691165/tp3-lara-blade)[ RSS](/packages/qq958691165-tp3-lara-blade/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

ThinkPHP3.2 blade模板引擎
=====================

[](#thinkphp32-blade模板引擎)

用法
--

[](#用法)

### 安装

[](#安装)

```
composer require qq958691165/tp3-lara-blade
```

### 使用

[](#使用)

共有两种用法: 控制器用法(局部使用)、配置用法(全局使用)

#### 控制器用法

[](#控制器用法)

若无"APP\_DIR"常量请先定义该常量，值为Runtime的父级目录

##### 创建基类AbstractController

[](#创建基类abstractcontroller)

```
use Tp3LaraBlade\Library\BladeView;

class AbstractController extends \Think\Controller {
    public function __construct()
    {
        parent::__construct();
        $this->view=BladeView::instance();
    }
}
```

##### 控制器继承AbstractController类即可使用

[](#控制器继承abstractcontroller类即可使用)

Home/Controller/IndexController.class.php

```
class IndexController extends AbstractController{
    public function index(){
        $this->msg='123456';
//        $str=$this->fetch();
//        dump($str);
        $this->display();
    }
}
```

Home/View/default/Index/index.blade.php

```
@extends('Home::default.Index.layout')
@section('body')
hello {{$msg}}
@endsection
```

#### 配置用法

[](#配置用法)

配置config.php(或C函数配置)

```
return [
    //...
    'TMPL_ENGINE_TYPE'=>'blade',
    'TMPL_TEMPLATE_SUFFIX'=>'.blade.php',
    //...
];
```

或

```
C('TMPL_ENGINE_TYPE','blade');
C('TMPL_TEMPLATE_SUFFIX','.blade.php');
```

### 说明

[](#说明)

#### blade模板语法请参考[laravel文档](https://learnku.com/docs/laravel/5.8/blade/3902)

[](#blade模板语法请参考laravel文档)

#### 若要启用@extends用法，则需要注册命名空间，以命名空间的方式去调用继承的视图(默认已注册Home模块)

[](#若要启用extends用法则需要注册命名空间以命名空间的方式去调用继承的视图默认已注册home模块)

```
\Tp3LaraBlade\RegisterContainer::registerNamespace('Admin',APP_DIR.'/Admin/View');
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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 ~1 days

Total

4

Last Release

1810d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bb006532a148984f2ee6703cbf4f9830af758d740ef02634d89cc7716485ccd1?d=identicon)[Martin Jack](/maintainers/Martin%20Jack)

---

Top Contributors

[![qq958691165](https://avatars.githubusercontent.com/u/13673962?v=4)](https://github.com/qq958691165 "qq958691165 (5 commits)")

### Embed Badge

![Health badge](/badges/qq958691165-tp3-lara-blade/health.svg)

```
[![Health](https://phpackages.com/badges/qq958691165-tp3-lara-blade/health.svg)](https://phpackages.com/packages/qq958691165-tp3-lara-blade)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135212.4k7](/packages/statamic-rad-pack-runway)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)[ycs77/inertia-laravel-ssr-head

Simple SSR Head for Inertia Laravel

3413.0k](/packages/ycs77-inertia-laravel-ssr-head)

PHPackages © 2026

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