$activity->key(), 'activity_type_id' => $activity->activity_type_id, 'client_id' => $activity->client->public_id, 'user_id' => $activity->user->public_id + 1, 'invoice_id' => $activity->invoice ? $activity->invoice->public_id : null, 'payment_id' => $activity->payment ? $activity->payment->public_id : null, 'credit_id' => $activity->credit ? $activity->credit->public_id : null, 'updated_at' => $this->getTimestamp($activity->updated_at) ]; } }