@extends('backend.layouts.main') @section('title') {{ __('Withdrawals') }} @endsection @section('content')
@if(Request::has('status')) @foreach(\Packages\Payments\Models\Withdrawal::statuses() as $status => $title) @if(Request::get('status') == $status) {{ $title }} @endif @endforeach @else {{ __('All statuses') }} @endif
@search(['route' => 'backend.withdrawals.index', 'search' => $search]) @endsearch
@if($withdrawals->isEmpty()) @else @component('components.tables.sortable-column', ['id' => 'id', 'sort' => $sort, 'order' => $order]) {{ __('ID') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'method', 'sort' => $sort, 'order' => $order]) {{ __('Method') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'amount', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Amount') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'payment_amount', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Payment amount') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'status', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Status') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'created', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Created') }} @endcomponent @foreach ($withdrawals as $withdrawal) @endforeach
{{ __('User') }}
{{ $withdrawal->id }} {{ $withdrawal->account->user->name }} @if($withdrawal->account->user->role == App\Models\User::ROLE_ADMIN) {{ __('app.user_role_'.$withdrawal->account->user->role) }} @endif {{ $withdrawal->method->name }} {{ $withdrawal->_amount }} {{ $withdrawal->_payment_amount }} {{ $withdrawal->_payment_currency }} {{ $withdrawal->status_title }} {{ $withdrawal->created_at->diffForHumans() }}
{{ __('View') }}
{{ $withdrawals->appends(request()->query())->links() }}
@endif @endsection