Laravel @prepend Directive

You know that we add data with @push to the field created with @stack. We also use this directive to add content to the beginning of the field.

// layout.blade.php
<head>
    ..
    @stack('head-info')
    ..
</head>

For example, let's say we push a value on our members page.

// users.blade.php

@push('head-info')
    <link href="{{ mix('css/users.css') }}">
@endpush

In addition, we can add a value before this css definition with the @prepend directive.

// users.blade.php

..

@prepend('head-info')
    <link href="{{ mix('css/users-pre.css') }}">
@endprepend
Comments

There are no comments, make the firs comment