vendredi 26 avril 2019

How to extend a layout without overwriting the scripts in the layout section (Laravel 5.8)

Ths should be simple enough, but...

I have a layout view dashboard-layout.blade.php with:

@section('headscripts')
  <script src="" defer></script>      
@show

And a billing.blade.php view that extends the layout file:

@extends('layouts.dashboard-layout')

@section('headscripts')
  @parent
  <script src="https://js.braintreegateway.com/web/dropin/1.17.2/js/dropin.min.js"></script>
@endsection

The problem is, this only outputs the first script...what am I doing wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire