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

Why nobody answering me.... Is that my english very poor?

0

You can create sections in your other blade files and inject them from another.

For example, you header can have an

@section('header')
@show

footer.blade.php

@section('footer')
@show

Then in your main body section you can use

@section('header')
IM INJECTING THIS INTO HEADER.BLADE.PHP
@stop
@section('footer')
IM INJECTING THIS INTO FOOTER.BLADE.PHP
@stop

Is that a solution? The code above replaces what is already in that section but you can just append stuff to the original content in that section.

0

adamkearsley said:

You can create sections in your other blade files and inject them from another.

For example, you header can have an

@section('header')
@show

footer.blade.php

@section('footer')
@show

Then in your main body section you can use

@section('header')
IM INJECTING THIS INTO HEADER.BLADE.PHP
@stop
@section('footer')
IM INJECTING THIS INTO FOOTER.BLADE.PHP
@stop

Is that a solution? The code above replaces what is already in that section but you can just append stuff to the original content in that section.

That is not a solution... What was outputed is quite different from expected.

Well, I have just implemented the solution... I will paste my code here.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

kcauchy kcauchy Joined 26 Jan 2015

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.