netdjw's avatar
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')?

0 likes
0 replies

Please or to participate in this conversation.