rf1705/blade-helpers

添加 includeOnce Blade 指令

v1.1.4 2023-09-28 12:04 UTC

This package is auto-updated.

Last update: 2024-09-28 14:22:42 UTC


README

添加新的 Blade-Directive @includeOnce

安装

您可以使用 Composer 安装它

composer require hebinet/blade-helpers

用法

该指令与 Laravel 原生的 @include 指令具有相同的性能。

您可以使用它如下

@includeOnce({view to include})
{{-- Or --}}
@includeOnce({view to include}, {data to pass through})

示例

{{-- Will include the view 'include-test' once --}}
@includeOnce('include-test')

{{-- Or you can even pass some data to the view --}}
@includeOnce('include-test', ['data'=>4])

贡献

请参阅 CONTRIBUTING 以获取详细信息。

安全

如果您发现任何与安全相关的问题,请通过电子邮件 office@hebinet.at 而不是使用问题跟踪器。

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件