Skip to content

Commit

Permalink
Support kebab-case in pushonce
Browse files Browse the repository at this point in the history
  • Loading branch information
ovanschie committed Jan 8, 2018
1 parent ef1a42b commit 398d36a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/directives.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
'pushonce' => function ($expression) {
list($pushName, $pushSub) = explode(':', trim(substr($expression, 1, -1)));

$key = '__pushonce_'.$pushName.'_'.$pushSub;
$key = '__pushonce_'.$pushName.'_'.str_replace('-', '_', $pushSub);

return "<?php if(! isset(\$__env->{$key})): \$__env->{$key} = 1; \$__env->startPush('{$pushName}'); ?>";
},
Expand Down

0 comments on commit 398d36a

Please sign in to comment.