rf1705/blade-helpers

Add includeOnce Blade directive

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

This package is auto-updated.

Last update: 2025-02-28 15:13:33 UTC


README

Adds a new Blade-Directive @includeOnce

Installation

You can install it using Composer:

composer require hebinet/blade-helpers

Usage

The directive has the same footprint as the native Laravel @include directive.

You can use it like this:

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

Examples

{{-- 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

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email office@hebinet.at instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.