RobinRadic / blade-extensions

Laravel Blade extensions like $loop->odd/$loop->index in foreach, view blocks and partials, etc
http://robin.radic.nl/blade-extensions
MIT License
267 stars 35 forks source link

BLADE-70 ⁃ Laravel 5.4 heredoc error #66

Closed codemonkeynorth closed 7 years ago

codemonkeynorth commented 7 years ago

I'm getting this when trying to use @embed

@embed('test1') @section('subtitle','test') @endembed

syntax error, unexpected end of file, expecting variable (T_VARIABLE) or heredoc end (T_END_HEREDOC) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN)

generated template

<?php app('blade-extensions.helpers')->get('embed')->start('test1'); ?>
<?php app('blade-extensions.helpers')->get('embed')->current()->setData($__data)->setContent(<<<'EOT_'

<?php $__env->startSection('subtitle', 'test'); ?>

\EOT_
); ?>
<?php app('blade-extensions.helpers')->get('embed')->end(); ?>

if i go in and remove the \ before the EOT, i then get a different error Call to a member function start() on null

please advise.. is it my PHP version? 5.6.25 thanks

RobinRadic commented 7 years ago

this is actually already fixed in this commit. I'll tag a new version when ready