Skip to content

Releases: Stillat/blade-directives

1.2.1

01 Feb 14:45
Compare
Choose a tag to compare

Simplifies the implementation of the Directive::callback method to be usable without heavy dependencies

1.2.0

01 Feb 01:26
ca1dfaf
Compare
Choose a tag to compare

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

24 Oct 00:58
7308fb4
Compare
Choose a tag to compare
  • Adds support for named arguments when calling Blade directives

1.0.0

23 Oct 22:12
e7bb118
Compare
Choose a tag to compare

Initial release :)