Support the ongoing development of Laravel.io →
posted 10 years ago
Views
Last updated 2 years ago.
0
<?php echo $__env->yieldContent("content");?>
</div>
</div>
<?php echo $__env->make("footer.blade.php", array_except(get_defined_vars(), array('__data', '__path')))->render();  ?>

replace this instead of previous

Last updated 2 years ago.
0

can you try to add a new line before and after the yield, I vaguely remember a similar problem

Last updated 2 years ago.
0

q8coder said: replace this instead of previous

Hi. I can't do anything about this part. This code is generated by Laravel. I try to find why Laravel generates this code with this kind of error.

Last updated 2 years ago.
0

zenry said:

can you try to add a new line before and after the yield, I vaguely remember a similar problem

Hi. I've tried but no effect...

Last updated 2 years ago.
0

might help if you can post what your footer code looks like.

it seems to be coming from your footer view. to troubleshoot, change the code in footer to something simple and see if that is working.

there does not seems to be anything wrong with the layout.

Last updated 2 years ago.
0

sattalk said:

might help if you can post what your footer code looks like.

it seems to be coming from your footer view. to troubleshoot, change the code in footer to something simple and see if that is working.

there does not seems to be anything wrong with the layout.

Hi, thanks for the reply. Here, the footer :

@section("footer")
    <div class="footer">
        <div class="container">
            2013-2014
        </div>
    </div>
@show

The footer is quite simple.

Last updated 2 years ago.
0

It's really strange. If I remove the @include, it works, if I put it back I have the same error.

Last updated 2 years ago.
0

I have reinstalled a fresh Laravel and guest what, the problem is still the same. Without @include it's ok, with an @include I have the same error again and again.

Last updated 2 years ago.
0
@section("footer")
    <div class="footer">
        <div class="container">
            2013-2014
        </div>
    </div>
@stop

what if you do this ?

Last updated 2 years ago.
0

yeah, i would also try @stop because @show is not valid.

Last updated 2 years ago.
0

eriktisme said:

@section("footer") <div class="footer"> <div class="container"> 2013-2014 </div> </div> @stop

what if you do this ?

Thanks for your reply. I did it but Laravel, still, generates the same code with the same error :

<!doctype html>
<html>
<head>
    <title></title>
</head>
<body>
    <div class="container">
        <?php echo $__env->yieldContent('container')
    </div>
		<?php echo $__env->make('testfooter', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>; ?>
</body>
</html>
Last updated 2 years ago.
0

@stop = valid @show = invalid, leads to unexpected results.

Last updated 2 years ago.
0

PROBLEM FIXED This is just unbelievable. All that story is not related to the code. This is a problem with the text editor : Notepad++ on Windows. For an unknown reason, and for somes files only, it switched from 'edit/EOL conversion/windows format' to 'edit/EOL conversion/Mac format'. And apparently, Laravel doesn't Mac format at all! So, if you use Notepad++ on Windows, be sure that you have : 'EOL conversion/windows format'. FYI : http://stackoverflow.com/questions/23125662/laravel-blade-include-error-syntax-error-unexpected

Last updated 2 years ago.
0

Same problem with Vim on a Mac. A simple 'set ff=unix' and resaving the file helped.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.