eee
This commit is contained in:
+39
-4
@@ -4,15 +4,50 @@
|
||||
|
||||
## 功能特性
|
||||
|
||||
### 基础功能
|
||||
- ✅ 变量输出:`{{ $variable }}` 和 `{!! $variable !!}`
|
||||
- ✅ 控制结构:`@if`, `@elseif`, `@else`, `@endif`
|
||||
- ✅ 循环:`@foreach`, `@endforeach`, `@for`, `@endfor`, `@while`, `@endwhile`
|
||||
- ✅ 布局继承:`@extends`, `@section`, `@yield`, `@endsection`
|
||||
- ✅ 包含视图:`@include`
|
||||
- ✅ JSON 输出:`@json($data)`
|
||||
- ✅ 控制结构:`@if`, `@elseif`, `@else`, `@endif`, `@unless`
|
||||
- ✅ 循环:`@foreach`, `@for`, `@while`, `@forelse` 及其结束指令
|
||||
- ✅ Switch:`@switch`, `@case`, `@default`, `@endswitch`
|
||||
- ✅ 布局继承:`@extends`, `@section`, `@yield`, `@endsection`, `@parent`
|
||||
- ✅ 包含视图:`@include`, `@each`
|
||||
- ✅ 注释:`{{-- comment --}}`
|
||||
- ✅ 原始 PHP:`@php ... @endphp`
|
||||
- ✅ 编译缓存:自动缓存编译后的模板以提高性能
|
||||
|
||||
### 条件判断语法糖
|
||||
- ✅ `@isset` / `@endisset` - 检查变量是否存在
|
||||
- ✅ `@empty` / `@endempty` - 检查变量是否为空
|
||||
- ✅ `@auth` / `@endauth` - 检查用户是否已认证
|
||||
- ✅ `@guest` / `@endguest` - 检查用户是否未认证
|
||||
- ✅ `@hasSection` / `@endhasSection` - 检查 section 是否存在
|
||||
- ✅ `@sectionMissing` / `@endsectionMissing` - 检查 section 是否缺失
|
||||
- ✅ `@can` / `@endcan` - 权限检查
|
||||
- ✅ `@cannot` / `@endcannot` - 反向权限检查
|
||||
|
||||
### 表单辅助
|
||||
- ✅ `@csrf` - CSRF token
|
||||
- ✅ `@method` - HTTP 方法伪装
|
||||
- ✅ `@old` - 旧输入值
|
||||
- ✅ `@checked` - 复选框选中状态
|
||||
- ✅ `@selected` - 下拉框选中状态
|
||||
- ✅ `@disabled` - 禁用状态
|
||||
- ✅ `@readonly` - 只读状态
|
||||
- ✅ `@required` - 必填状态
|
||||
- ✅ `@error` / `@enderror` - 错误信息显示
|
||||
|
||||
### 栈和推送
|
||||
- ✅ `@push` / `@endpush` - 推送到栈
|
||||
- ✅ `@prepend` / `@endprepend` - 前置推送到栈
|
||||
- ✅ `@stack` - 输出栈内容
|
||||
|
||||
### 其他语法糖
|
||||
- ✅ `@once` / `@endonce` - 只执行一次
|
||||
- ✅ `@lang` - 语言翻译
|
||||
- ✅ `@class` - 条件类名
|
||||
- ✅ `@style` - 条件样式
|
||||
|
||||
## 使用方法
|
||||
|
||||
### 基本用法
|
||||
|
||||
Reference in New Issue
Block a user