Closed pedzed closed 6 years ago
prepend
ing is not too important for me personally, but being able to push
to a stack
is really essential. For example, on some pages I might need jQuery, but on other pages I'd rather not include them.
The concept of stacks itself is too complicated, you can simply use sections here.
@section('scripts')
<script src="1.js"></script>
<script src="2.js"></script>
@endsection
Now let's say, you want one more script in a different template
@section('scripts')
@super
<script src="3.js"></script>
@endsection
@super
will inherit from the master template and adds the 3rd one.
It would be nice to have stacks, exactly like Laravel's Blade engine.
Related: https://laravel.com/docs/5.6/blade#stacks