@extends('layouts.member')
@section('content')


    @if(count($withdraw))

        <div class="row">
            <div class="col-md-12">


                <div class="portlet light bordered">
                    <div class="portlet-title">
                        <div class="caption font-dark">
                        </div>
                        <div class="tools"> </div>
                    </div>
                    <div class="portlet-body">
                        <table class="table table-striped table-bordered table-hover" id="sample_1">

                            <thead>
                            <tr>
                                <th>ID#</th>
                                <th>Withdraw Date</th>
                                <th>Withdraw Method</th>
                                <th>Withdraw Balance</th>
                                <th>Withdraw Status</th>
                            </tr>
                            </thead>

                            <tbody>
                            @php $i=0;@endphp
                            @foreach($withdraw as $p)
                                @php $i++;@endphp
                                <tr>
                                    <td>{{ $i }}</td>
                                    <td>{{ date('d-F-Y',strtotime($p->created_at))  }}</td>
                                    <td>{{ $p->method->name }}</td>
                                    <td>{{ $p->balance }} - USD</td>
                                    <td>
                                        @if($p->status == 0)
                                            <span class="label label-primary"><i class="fa fa-spinner"></i> Processing</span>
                                        @elseif($p->status == 1)
                                            <span class="label label-primary"><i class="fa fa-check"></i> Completed</span>
                                        @else
                                            <span class="label label-primary"><i class="fa fa-times"></i> Refunded</span>
                                        @endif
                                    </td>

                                </tr>
                            @endforeach

                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
        </div><!-- ROW-->

    @else

        <div class="text-center">
            <h3>No Data available</h3>
        </div>
    @endif


@endsection
