命令集
{{ $var }} - 輸出PHP變數{{ $var or 'default' }} - 輸出PHP變數帶預設值{{{ $var }}} - 輸出轉義內容{{-- Comment --}} - 模板注釋@extends('layout') - 繼承模板@if(condition) - if語句開頭@else - else@elseif(condition) - else if@endif - if結束@foreach($list as $key => $val) - foreach開頭@endforeach - foreach結束@for($i = 0; $i < 10; $i++) - for開頭@endfor - for結尾@while(condition) - while 開頭@endwhile - while 結尾@unless(condition) - unless 開頭@endunless - unless 結尾include(file) - 引入模板@include(file, ['var' => $val,...]) - 通過新變數引入模板.@each('file',$list,'item') - 渲染樣板集合@each('file',$list,'item','empty')- 渲染集合中一個模板如果該模板不存在或空渲染另一個@yield('section') - 定義一個區塊.@show - 結束定義區塊@lang('message') - 輸出多語言@choice('message', $count) - 輸出國際化語言@section('name') - section區塊開始@stop - section結束(section的處理到此為止)@endsection - section結束(在 4.0 版本中已經被移除)@append - 通過section的名字追加到section內容裡@overwrite - 通過section的名字,覆蓋之前的所有定義,以這次的為準