Answer the question
In order to leave comments, you need to log in
How to pass form to slot?
@component('vendor.modals.modal')
@slot('id')delete{{$manager->id}}@endslot
@slot('title')@lang('control.user-deleting') {{$manager->name}}@endslot
@lang('control.user-deleting-confirm',['name'=>$manager->name])
@slot('footer')
<form method="POST" action="{{ route('admin.delete',['id'=>$manager->id]) }}">
{{ method_field('DELETE') }}
<button type="button" class="btn btn-danger" ><span class="glyphicon glyphicon-ok-sign"></span> @lang('control.confirm')</button>
</form>
@endslot
@endcomponent
<form method="POST" action="http://localhost/managers/1"></form>
<input type="hidden" name="_method" value="DELETE">
<button type="button" class="btn btn-danger">
<span class="glyphicon glyphicon-ok-sign"></span> Да</button>
<div class="modal fade" id="{{$id}}" tabindex="-1" role="dialog" aria-labelledby="edit" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
<h4 class="modal-title custom_align" id="Heading">{{$title}}</h4>
</div>
<div class="modal-body">
{{ $slot }}
</div>
<div class="modal-footer ">
<button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> @lang('control.cancel')</button>
{{$footer}}
</div>
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question