[Bug]: Filters with parameters throw Syntax Error
pilot-max opened this issue · comments
Description
Using: https://pineco.de/laravel-blade-filters/
Blade filters with parameters (like in Twig) throw a syntax error.
<div class="notification-body">{{ $notification->data['message'] | blurb:10 }}</div>
With the filter as below:
BladeFilters::macro('blurb', function (string $blurb, int $numberOfWords = 25) {
return Str::words($blurb, $numberOfWords);
});
Expected Behavior
Format the blade file as normal, leaving the parameters inline
Actual Behavior
Parse Error : syntax error, unexpected ':', expecting ';' on line 1 > 1 | data['message'] | blurb:10 ?> | ^
Additional Context
No response
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days