Git Product home page Git Product logo

think-blade's Introduction

Think-Blade

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

Installation

composer require terranc/think-blade

conig.php:

'template'               => [
        // 模板引擎类型 支持 php think 支持扩展
        'type'         => 'Blade',
        // 模板路径
        'view_path'    => '',
        // 模板后缀
        'view_suffix'  => 'blade.php',
        // 模板文件名分隔符
        'view_depr'    => DS,
        // 模板引擎普通标签开始标记
        'tpl_begin'    => '{{',
        // 模板引擎普通标签结束标记
        'tpl_end'      => '}}',
        'tpl_raw_begin'    => '{!!',
        'tpl_raw_end'    => '{!!',
        // 标签库标签开始标记
        'taglib_begin' => '{',
        // 标签库标签结束标记
        'taglib_end'   => '}',
    ],

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

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

think-blade's People

Contributors

terranc avatar lifeha avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.