I have a Laravel 5.7 project that has a blade view that contains a nested view. Inside the nested view I want to yield a section that is defined in the parent blade view, however the section is not rendering inside the nested view. How can i pass the section from the parent view to the nested view so that it renders inside the nested view?
Parent view - index.blade.php:
@section('content')
@include('../elements/admin-crud-tbl')
@endsection
@section('bonus-row-btns')
<v-btn title="Mark As Contacted" color="primary" fab small @click="updateContacted(props.item.id)" v-show="!props.item.contacted"><v-icon>check_circle_outline</v-icon></v-btn>
<v-chip small v-show="props.item.contacted" color="green" text-color="white"><v-icon>check_circle_outline</v-icon>Contacted!</v-chip>
@endsection
Nested view - admin-crud-tbl:
<td class="text-right align-middle">
@yield('bonus-row-btns')
<v-btn title="Edit" color="primary" fab small @click="edit(props.item.id)"><v-icon>edit</v-icon></v-btn>
<v-btn title="Delete" color="error" fab small class="text-white" @click="remove(props.item.id)"><v-icon>delete_outline</v-icon></v-btn>
</td>
How can I get section "bonus-row-btns" to properly render inside the nested view?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire