Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/V4/WalletsController.php
Show First 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | public function transactions($id) | ||||
$amount *= -1; | $amount *= -1; | ||||
} | } | ||||
$entry = [ | $entry = [ | ||||
'id' => $item->id, | 'id' => $item->id, | ||||
'createdAt' => $item->created_at->format('Y-m-d H:i'), | 'createdAt' => $item->created_at->format('Y-m-d H:i'), | ||||
'type' => $item->type, | 'type' => $item->type, | ||||
'description' => $item->shortDescription(), | 'description' => $item->shortDescription(), | ||||
'period_start' => $item->period_start, | |||||
'period_end' => $item->period_end, | |||||
'amount' => $amount, | 'amount' => $amount, | ||||
'hasDetails' => !empty($item->cnt), | 'hasDetails' => !empty($item->cnt), | ||||
]; | ]; | ||||
if ($isAdmin && $item->user_email) { | if ($isAdmin && $item->user_email) { | ||||
$entry['user'] = $item->user_email; | $entry['user'] = $item->user_email; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |