Adds a new Blade-Directive @includeOnce
You can install it using Composer:
composer require hebinet/blade-helpers
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})
{{-- 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])
Please see CONTRIBUTING for details.
If you discover any security related issues, please email office@hebinet.at instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.