kanagama / add-directives-to-laravel-blade
添加 Laravel Blade 指令
v1.0.2
2023-03-09 13:09 UTC
Requires
- php: ^7.4|^8.0
- laravel/framework: ^8.0|^9.0
Requires (Dev)
- orchestra/testbench: ^6.25
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-09-16 06:55:11 UTC
README
因为闲暇所以做了。
安装方法
composer require kanagama/add-directives-to-larave-blade
添加的指令列表
@true
$conditions 条件式为 true 时才显示。
@true ($condition) // $condition が true の場合の処理 @endtrue
@false
$conditions 条件式为 false 时才显示。
@false ($condition) // $condition が false の場合の処理 @endfalse
@notempty
@empty 指令的反向行为
$conditions 不为空时才显示
@notempty ($condition) // $condition が empty でない場合の処理 @endnotempty
@notisset
@isset 指令的反向行为
$conditions 未定义或为 null 时才显示
@notisset ($condition) // $condition が定義されていない、または null の場合の処理 @endnotisset
@isnull
$conditions 为 null 时才显示
@isnull ($condition) // $condition が null の場合の処理 @endisnull
@isnotnull
$conditions 不为 null 时才显示
@isnotnull ($condition) // $condition が null でない場合の処理 @endisnotnull
@loop
$conditions 的次数将显示
@foreach 与该指令相同,可以使用 $loop 变量。
@loop ($condition) // $condition が 3 の場合、3回表示されます {{ $loop->index }} @endloop