Skip to content

Commit

Permalink
improved @anchor blade directive to resolve extender class just befor…
Browse files Browse the repository at this point in the history
…e is rendered
  • Loading branch information
tjodalv committed Mar 20, 2024
1 parent 2512a75 commit 99bf02b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Blade/ExtendBlade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ public function boot()
<?php
foreach (
\Kanuni\LaravelBladeAnchor\Facades\LaravelBladeAnchor::getExtenders(\$__current_view_name, $anchorName)
as \$extender
as \$extenderClass
) {
\$extender(get_defined_vars());
\$extender = app(\$extenderClass);
echo \$extender(get_defined_vars());
}
?>
DIRECTIVE;
Expand Down

0 comments on commit 99bf02b

Please sign in to comment.