2017 © Pedro Peláez
 

library think-blade

think blade view engine

image

evan-li/think-blade

think blade view engine

  • Tuesday, January 9, 2018
  • by evan-li
  • Repository
  • 1 Watchers
  • 0 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 19 Forks
  • 0 Open issues
  • 7 Versions
  • 7 % Grown

The README.md

Think-Blade

Blade template engine with thinkphp 5. (component & slot support), (*1)

Installation

composer require evan-li/think-blade

配置

template.php:, (*2)

return [

    // 模板引擎类型 支持 php think 支持扩展
    'type'         => 'Blade',
    // 视图基础目录(集中式)
    'view_base'   => '',
    // 是否开启模板编译缓存,设为false则每次都会重新编译
    'tpl_cache'          => true,
    // 模板起始路径
    'view_path'   => '',
    'tpl_begin'   => '{{',
    'tpl_end'   => '}}',
    'tpl_raw_begin'   => '{!!',
    'tpl_raw_end'   => '!!}',
    'view_cache_path'   =>  Env::get('runtime_path') . 'temp' . DIRECTORY_SEPARATOR, // 模板缓存目录
    // 模板文件后缀
    'view_suffix' => 'blade.php',

];

Usage

<header id="navbar">
    <div class="row navbar-inner">
        <div class="col-xs-6 brand-block">
            <h4><a href="{{ url('/admin') }}"><img src="/assets/admin/images/logo.png"></a> · 管理后台
            </h4>
            <a href="javascript:;" class="cd_nav_trigger"><span></span></a>
        </div>
        <div class="col-xs-6 text-right user-block">
            你好,{{ $manage_user->nickname }}({{ $manage_user->username }})
            <span class="gap-line"></span>
            <a href="{{ url('/manage/index/account') }}" class="item">修改资料</a>
            <span class="gap-line"></span>
            <a href="{{ url('/manage/start/logout') }}" class="confirm item" title="确认要退出吗?">退出</a>
        </div>
    </div>
</header>

DOC

https://laravel.com/docs/5.4/blade, (*3)

http://d.laravel-china.org/docs/5.4/blade (中文), (*4)

The Versions

09/01 2018

dev-master

9999999-dev

think blade view engine

  Sources   Download

Apache2

The Requires

 

09/01 2018

1.2.1

1.2.1.0

think blade view engine

  Sources   Download

Apache2

The Requires

 

28/11 2017

1.2

1.2.0.0

think blade view engine

  Sources   Download

Apache2

The Requires

 

28/11 2017

1.1

1.1.0.0

think blade view engine

  Sources   Download

Apache2

The Requires

 

05/02 2017

1.0.2

1.0.2.0

think blade view engine

  Sources   Download

Apache2

The Requires

 

by Avatar terranc

05/02 2017

1.0.1

1.0.1.0

think blade view engine

  Sources   Download

Apache2

The Requires

 

by Avatar terranc

05/02 2017

1.0

1.0.0.0

think blade view engine

  Sources   Download

Apache2

The Requires

 

by Avatar terranc