@extends('backend.layouts.main') @section('title') {{ __('Accounts') }} @endsection @section('content')
@search(['route' => 'backend.accounts.index', 'search' => $search]) @endsearch
@if($accounts->isEmpty()) @else @component('components.tables.sortable-column', ['id' => 'id', 'sort' => $sort, 'order' => $order]) {{ __('ID') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'balance', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Balance') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'created', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Created') }} @endcomponent @component('components.tables.sortable-column', ['id' => 'updated', 'sort' => $sort, 'order' => $order, 'class' => 'text-right']) {{ __('Updated') }} @endcomponent @foreach($accounts as $account) @endforeach
{{ __('User') }}
{{ $account->id }} {{ $account->user->name }} @if($account->user->role == App\Models\User::ROLE_ADMIN) {{ __('app.user_role_'.$account->user->role) }} @elseif($account->user->role == App\Models\User::ROLE_BOT) {{ __('app.user_role_'.$account->user->role) }} @endif {{ $account->_balance }} {{ $account->created_at->diffForHumans() }} {{ $account->updated_at->diffForHumans() }}
{{ $accounts->appends(['search' => $search])->appends(['sort' => $sort])->appends(['order' => $order])->links() }}
@endif @endsection