Skip to content

[5.4] Bade @stack, Order bug #17768

@set0x

Description

@set0x

I have updated my project to version 5.4 and have found that the @stack components don't correctly order the elements.

Firts View app.blade.php

{{-- Basic html with Bootstrap --}}

<div class="container">

    @yield('title')

    <ol class="breadcrumb">

        @stack('breadcrumb')

    </ol>

</div>

{{-- Basic html with Bootstrap --}}

Second View default.blade.php

@extends('app')

@push('breadcrumb')

    <li><a href="/">0</a></li>
    <li><a href="/">1</a></li>

@endpush

@section('title')

    <div class="page-header">
        <h1>Laravel 5.4 | Bug Stack Order</h1>
    </div>

@endsection

Third view welcome.blade.php

@extends('default')

@push('breadcrumb')
    <li><a href="/">2</a></li>
@endpush

Result

<div class="container">
    
    <div class="page-header">
        <h1>Laravel 5.4 | Bug Stack Order</h1>
    </div>

    <ol class="breadcrumb">
        <li><a href="/">2</a></li>
        <li><a href="/">0</a></li>
        <li><a href="/">1</a></li>
    </ol>
    
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions