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.
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.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community