@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>