Instead of using a partial(for which you are doing @yield('content') ), you can use view components.

<div class="container">
        @component('content', ['moneytrades' => $moneytrades])

Then access in your component content,

   <div class="col-md-8">
         @foreach ($moneytrades as $mt)
            {{-- do whatever you want  --}}

Edit : View Components in blade components is available for Laravel >= 5.4.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top