Jun 28, 2023
0
Level 15
How to test in view component @section content?
In my project I have this code in a component's blade template:
@section('scripts')
<script type="text/javascript">
// ...
</script>
@endsection
@section('content')
@foreach($popups as $popup)
<div id="{{ $popup->modal_id }}" class="popup">
...
</div>
@endforeach
@endsection
How can I test using $component = new PopupComponent() way what is the result in @section('content') and @section('scripts')?
Please or to participate in this conversation.