Support the ongoing development of Laravel.io →
posted 10 years ago
Views Blade
Last updated 2 years ago.
0

You can use @yield in the master layout and @section in the child views instead of @include.

http://laravel.com/docs/templates#blade-templating

Last updated 2 years ago.
0

enkay said:

You can use @yield in the master layout and @section in the child views instead of @include.

http://laravel.com/docs/templates#blade-templating

Thanks, but that's not the solution.

Last updated 2 years ago.
0

You mean like this ? Dynamic Layout in Laravel 4

headView.php

<?php
    
   /*This how you Start a Section in a view*/
    View::startSection('head'); ?>

   <head>
         <tiitle>Halooo, im a dynamic content</title>
    </head> 


<?php View::stopSection(); ?>

Then call it anywhere

<?php echo View::yieldContent('head'); ?>
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Gugis gugis Joined 6 Mar 2014

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.