Releases: Stillat/blade-directives
Releases · Stillat/blade-directives
1.2.1
1.2.0
Adds a new Directive::callback
method that can be used to author Blade directives as if they were just normal PHP methods:
The PHP code can now become:
<?php
use Stillat\BladeDirectives\Support\Facades\Directive;
use Illuminate\Support\Str;
Directive::callback('limit', function ($value, $limit = 100, $end = '...') {
return Str::limit($value, $limit, $end);
});
and our Blade templates can now be written like so:
@limit($myString, end: '---')
1.1.0
- Adds support for named arguments when calling Blade directives
1.0.0
Initial release :)