A Laravel package providing additional Blade functionality.
Tested on all Laravel 5.x versions.
The package follows the FIG standards PSR-1, PSR-2, and PSR-4 to ensure a high level of interoperability between shared PHP code.
- Compatible with all Laravel 5 versions
- 20+ Configurable, nameable, extendable, replaceable, testable directives.
- Compile Blade strings with variables
BladeExtensions::compileString($string, array $vars = [])
- Progamatically push content to a stack inside blade view(s)
BladeExtensions::pushToStack($stack, $views, $content)
- Even if you don't use any of the directives, Blade Extensions provides you with a great method to manage your directives.
All directives can be disabled, extended or replaced.
- @set / @unset Setting and unsetting of values
- @breakpoint / @dump Dump values to screen and set breakpoints in views
- @foreach / @break / @continue Loop data and extras (similair to twig
$loop
) - @embed Think of embed as combining the behaviour of include and extends. (similair to twig
embed
) - @minify / @endminify Minify inline code. Supports CSS, JS and HTML.
- @macro / @endmacro/ @macrodef Defining and running macros
- @markdown/ @endmarkdown
- @spaceless / @endspaceless
- and more... `
"radic/blade-extensions": "~7.0"
Radic\BladeExtensions\BladeExtensionsServiceProvider::class
php artisan publish --tag=config --provider="Radic\BladeExtensions\BladeExtensionsServiceProvider"
Copyright 2015 Robin Radic - MIT Licensed