@extends('include.dashboard')

@section('style')

@stop
@section('content') <div class="nk-content">
                        <div class="container-fluid">
                            <div class="nk-content-inner">
                                <div class="nk-content-body">
    <div class="nk-content-body">
                                <div class="nk-content-wrap">
                                    <div class="nk-block-head nk-block-head-lg">

                                        <div class="nk-block-between-md g-4">
                                            <div class="nk-block-head-content">
                                                <h4 class="nk-block-title fw-normal">Multi Level Marketing Referral System</h4>
                                                <div class="nk-block-des">
                                                    <p class="text-primary">You can earn bonuses and points from referring people to {{$basic->sitename}} using your referral link.</p>
                                                </div>
                                            </div>
                                        </div>
                                    </div><!-- .nk-block-head -->
                                    <div class="nk-block">
                                        <ul class="sp-pdl-list">
                                        @for($i = 1; $i <= $basic->matrix_height; $i++)
                                            <li class="sp-pdl-item">
                                                <div class="sp-pdl-desc">
                                                    <div class="sp-pdl-img"><img src="{{asset('core-img/plan.svg')}}" alt=""></div>
                                                    <div class="sp-pdl-info">
                                                        <h6 class="sp-pdl-title">  <span class="badge badge-sm badge-dim badge-primary badge-pill">@lang('Level '.$i)</span></h6>

                                                    </div>
                                                </div>
                                                <div class="sp-pdl-btn">
                                                    <a href="{{route('matrix.index', ['lv_no' => $i])}}" class="btn btn-primary">View</a>
                                                </div>
                                            </li><!-- .sp-pdl-item -->
                                            @endfor
                                        </ul><!-- .sp-pdl-list -->
                                    </div><!-- .nk-block -->
                                    <div class="nk-block nk-block-lg">
                                        <div class="card card-bordered">
                                            <div class="card">
                <div class="table-responsive table-responsive-xl">
                    <table class="table align-items-center table-light">
                        <thead>
                        <tr>
                            <th scope="col">@lang('Username')</th>
                            <th scope="col">@lang('Under Position')</th>
                            <th scope="col">@lang('Ref. By')</th>
                            <th scope="col">@lang('Balance')</th>

                        </tr>
                        </thead>
                        <tbody class="list">
                        {{ showUserLevel(auth()->user()->id, $lv_no) }}
                        </tbody>

                    </table>
                </div>

            </div>
                                        </div><!-- .card -->
                                    </div><!-- .nk-block -->
                                </div></div></div></div></div></div>
@endsection


