@view('header', [ 'title' => 'Transactions' ])

Transactions

@if (count($transactions) > 0): @view('pagination', [ 'page' => $page, 'last_page' => $last_page ]) @foreach ($transactions as $transaction): @if (!is_numeric($transaction->from_account_id) || (is_numeric($transaction->to_account_id) && $transaction->to_account->user_id == Auth::id())):

{{ $transaction->name }}

@if (is_numeric($transaction->from_account_id)):

From: {{ $transaction->from_account->name }}

@else:

From: {{ $transaction->from_account_id }}

@endif @if (is_numeric($transaction->to_account_id)):

To: {{ $transaction->to_account->name }}

@else:

To: {{ $transaction->to_account_id }}

@endif

Amount: {!! format_money($transaction->amount) !!}

Send at: {{ $transaction->created_at }}

@endif @if (!is_numeric($transaction->to_account_id) || (is_numeric($transaction->from_account_id) && $transaction->from_account->user_id == Auth::id())):

{{ $transaction->name }}

@if (is_numeric($transaction->from_account_id)):

From: {{ $transaction->from_account->name }}

@else:

From: {{ $transaction->from_account_id }}

@endif @if (is_numeric($transaction->to_account_id)):

To: {{ $transaction->to_account->name }}

@else:

To: {{ $transaction->to_account_id }}

@endif

Amount: {!! format_money($transaction->amount) !!}

Send at: {{ $transaction->created_at }}

@endif @endforeach @view('pagination', [ 'page' => $page, 'last_page' => $last_page ]) @else:

There are no transactions found

@endif @view('footer')