Skip to content

hebinet/blade-helpers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Blade Helpers

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.