I have migrated my app from laravel 4.2 to laravel 5
I am currently having this problem, when even I have old comments like this:
{{--{{link_to_route('language.select', 'English', array('en'))}}--}}
Will result into error at laravel 5, I will have this error:
FatalErrorException in 18b6386ebc018eb0c0e76f105eba4286 line 263:
syntax error, unexpected '{'
which is compiled into:
<?php echo --{{link_to_route('language.select', 'English', array('en')); ?>--}}
I already added laravel 4 backward comparability support at register@ServiceProvider as:
\Blade::setRawTags('{{', '}}');
\Blade::setContentTags('{{{', '}}}');
\Blade::setEscapedContentTags('{{{', '}}}');
but how can I add laravel 4 backward comparability for comments {{-- --}}
?
edit:
how to comment this in laravel 5:
<li {{ (Request::is('/') ? ' class="active"' : '') }}><a href="{{{ URL::to('') }}}">{{trans('messages.Home')}}</a></li>
Blade is the simple, yet powerful templating engine that is included with Laravel. Unlike some PHP templating engines, Blade does not restrict you from using plain PHP code in your templates.
Since you change your content tags from {{
to {{{
comment tags are now {{{--
not {{--
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With